Classes | |
class | StringTokenizer |
class | Table |
Functions | |
string | toString (void *v) |
string | toString (bool v) |
string | toString (short v) |
string | toString (unsigned short v) |
string | toString (int v) |
string | toString (unsigned v) |
string | toString (long v) |
string | toString (unsigned long v) |
string | toString (float v) |
string | toString (double v) |
string | toString (long double v) |
bool | isPrefixOf (string prefix, string s, bool ignoreCase) |
bool | isSuffixOf (string suffix, string s, bool ignoreCase) |
string | toLowerCase (string s) |
string | toUpperCase (string s) |
string | initCap (string s) |
string | trim (string) |
Strip leading and trailing whitespace. | |
string | lineTrim (string) |
Strip leading and trailing blank lines. | |
int | compareIgnoreCase (const string &a, const string &b) |
Returns 0 if a and b are equal, -1 if a is lexicographically before b, and 1 otherwise. | |
string | escapeNonprintable (const string &s) |
ustring | escapeNonprintable (const ustring &s) |
string | format (string, int width=0) |
Formats text to a certain width, or flatterns text to one line if "width" < 0. | |
int | width (string s) |
int | height (string s) |
string | extractLine (string s, int i) |
string | format (Table< string > &table, int maxTotalWidth, int columnSpacing, bool header) |
string | toString (string v) |
string | toString (ustring v) |
string | toString (const Time &t) |
|
Definition at line 233 of file text.C. References Archon::Utilities::Unicode::decodeUtf8(). |
|
Formats text to a certain width, or flatterns text to one line if "width" < 0. Below a text is viewed as consisting of words delimited by sequences of white-space characters. In this context white-space characters are considered to be:
All sequences of white-space characters are reduced to one of:
Existing line brakings: If "width" >= 0 then newline characters occuring in the source text are preserved, except when they occur at the end of the text, that is, when no words follow. if "width" < 0 then newline characters are discarded. Line splitting: If "width" > 0 then lines are split into pieces, so that each resulting line has a maximum length of "width". Whenever possible the splitting is done right after the last word that fits on the line. This only fails if we encounter a word that is wider than "width". In this case the word is split into as many lines as needed in such a way that all except the last line have length exactly equal to "width". Definition at line 266 of file text.C. References Archon::Utilities::Text::StringTokenizer::hasMoreElements(), and Archon::Utilities::Text::StringTokenizer::nextToken(). Referenced by format(), Archon::Utilities::Options::list(), Archon::Utilities::NFA::print(), Archon::Utilities::DFA::print(), Archon::Utilities::CFG::print(), Archon::Utilities::CFG::FollowSets::print(), and Archon::Utilities::CFG::FirstSets::print(). |
|
Strip leading and trailing blank lines. While trim will eliminate any indent on the first line of the input this function retains that indent. Otherwise they are identical. Definition at line 167 of file text.C. Referenced by Archon::Utilities::FormatLibjpeg::load(). |