ThePEG::StringUtils Class Reference

The StringUtils class contains a few static utility functions for basic strings. More...

#include <StringUtils.h>

List of all members.

Public Types

typedef vector< string > StringVector
 A vector of strings.
typedef string::size_type pos_t
 Convenient typdef.

Static Public Member Functions

static StringVector split (string s, string ws=" \t\n")
 Return a vector of string containing the substrings of s, defined by the separating characters in ws (the ws characters are not included in the substrings.
static string car (string s, string ws=" \t\n")
 Return the first substring of s, defined by the separating characters in ws (the ws characters are not included in the substrings.
static string cdr (string s, string ws=" \t\n")
 Return s after removing the first substring, defined by the separating characters in ws (the ws characters are not included in the substrings.
static string stripws (string str)
 Return the string str stripped from leading and trailing white space.
static string dirname (string file)
 Return the directory path part (excluding the trailing slash) of the given filename, or an empty string if no directory path is included.
static string basename (string file)
 Return the base name of the given filename, removing the directory path if present.
static string remsuf (string file)
 Remove the trailing suffix from the given filename.
static string suffix (string file)
 Return the trailing suffix (without the dot) of the given filename.
static map< string, string > xmlAttributes (string tag, string line, string::size_type curr=0)
 Assuming the line contains a valid XML tag, scan the line for attributes belonging to this tag and return a map of name-value pairs.

Static Public Attributes

static const pos_t end = string::npos
 Convenient alias for npos.


Detailed Description

The StringUtils class contains a few static utility functions for basic strings.

Definition at line 21 of file StringUtils.h.


Member Function Documentation

static map<string,string> ThePEG::StringUtils::xmlAttributes ( string  tag,
string  line,
string::size_type  curr = 0 
) [static]

Assuming the line contains a valid XML tag, scan the line for attributes belonging to this tag and return a map of name-value pairs.

Oprionally only look from position curr in the line.


The documentation for this class was generated from the following file:

Generated on Thu Apr 29 12:43:25 2010 for ThePEG by  doxygen 1.5.5