Static Public Member Functions |
| static std::string | Strip (const std::string &s, const char &x= '\0') |
| | String utilities.
|
|
static std::string | StripNull (const std::string &s) |
| | Strip out null characters from string.
|
|
static std::string | Trim (const std::string &s) |
| | Trim off leading & trailing spaces from string.
|
| static std::string | CentreString (const std::string &text, const int &fieldwidth, const int &cenpos=0) |
| | Return string of length <fieldwidth> with text centred on position cenpos in it.
|
|
static std::string | PadString (const std::string &text, const int &fieldwidth) |
| | Return string of length Max(fieldwidth, Length(text)).
|
|
static std::string | RightString (const std::string &text, const int &fieldwidth) |
| | Return right-justified string.
|
|
static std::string | LeftString (const std::string &text, const int &fieldwidth) |
| | Return left-justified string.
|
|
static std::vector< std::string > | split (const std::string &str, const std::string &sep) |
| | Return substrings split at string "sep" (excluded).
|
|
static std::vector< std::string > | split (const std::string &str, const std::string &sep1, const std::string &sep2) |
| | Return substrings split at string "sep1" or "sep2" (excluded).
|
|
static std::string | MakeXMLtag (const std::string &tag, const std::string &data) |
| | make XML tag <tag><data</tag>
|
|
static std::string | ftos (const float f, const int w, const int d) |
| | fixed point float to string conversion (w.df)
|
|
static std::string | etos (const float f, const int w, const int d) |
| | floating point float to string conversion (w.df)
|
|
static std::string | ftos (const double f, const int w, const int d) |
| | fixed point double to string conversion (w.df)
|
|
static std::string | etos (const double f, const int w, const int d) |
| | floating point double to string conversion (w.df)
|
| static std::string | WrapLine (const std::string &line, const int &pagewidth, const int &nindent, const std::string &sepc=" ") |
| | returns wrapped line with indent
|
| static std::string | formatFraction (const double &fr, const int &width) |
| | Format a real number as a fraction ie "n/m".
|
| static std::string | ToUpper (const std::string &s) |
| | returns uppercase version of string
|
|
static std::string | BuftoLine (const std::string buf) |
| | Extract line from buffer, removing any trailing Cr or Lf characters.
|
|
static std::string | FormatSaveVector (const std::vector< int > ivec) |
| | format integer vector for dump/save
|
|
static std::string | FormatSaveVector (const std::vector< double > vec) |
| | format real vector for dump/save
|