Miscellaneous functions related to strings. More...
Static Public Member Functions | |
| static bool | isStringEqualNoCase (const string &s1, const char *s2, const string::size_type n) |
| static bool | isStringEqualNoCase (const string &s1, const string &s2) |
| static bool | isStringEqualNoCase (const string::const_iterator begin, const string::const_iterator end, const char *s, const string::size_type n) |
| static const string | toLower (const string &str) |
| static const string | toUpper (const string &str) |
| static const string | trim (const string &str) |
| static string::size_type | countASCIIchars (const string::const_iterator begin, const string::const_iterator end) |
| template<class TYPE > | |
| static const string | toString (const TYPE &value) |
| template<class TYPE > | |
| static const TYPE | fromString (const string &value) |
| static const string | unquote (const string &str) |
Miscellaneous functions related to strings.
| string::size_type countASCIIchars | ( | const string::const_iterator | begin, | |
| const string::const_iterator | end | |||
| ) | [static] |
Return the number of 7-bit US-ASCII characters in a string.
| begin | start position | |
| end | end position |
References vmime::count(), and parserHelpers::isAscii().
Referenced by text::createFromString().
| static const TYPE fromString | ( | const string & | value | ) | [static] |
Convert the specified string value to a value of the specified type.
| value | value to convert |
| bool isStringEqualNoCase | ( | const string::const_iterator | begin, | |
| const string::const_iterator | end, | |||
| const char * | s, | |||
| const string::size_type | n | |||
| ) | [static] |
Test two strings for equality (case insensitive).
| begin | start position of the first string | |
| end | end position of the first string | |
| s | second string (must be in lower-case!) | |
| n | length of the second string |
Test two strings for equality (case insensitive).
| s1 | first string | |
| s2 | second string |
References vmime::end().
| bool isStringEqualNoCase | ( | const string & | s1, | |
| const char * | s2, | |||
| const string::size_type | n | |||
| ) | [static] |
Test two strings for equality (case insensitive).
| s1 | first string | |
| s2 | second string (must be in lower-case!) | |
| n | length of the second string |
Referenced by relay::parse().
Transform all the characters in a string to lower-case.
| str | the string to transform |
Referenced by disposition::addModifier(), headerFieldFactory::create(), header::findAllFields(), header::findField(), parameterizedHeaderField::findParameter(), header::getField(), parameterizedHeaderField::getParameter(), header::hasField(), disposition::hasModifier(), parameterizedHeaderField::hasParameter(), encoding::operator=(), encoding::operator==(), mediaType::parse(), encoding::parse(), messageDigestFactory::registerAlgorithm(), headerFieldFactory::registerField(), headerFieldFactory::registerFieldValue(), encoderFactory::registerName(), disposition::removeModifier(), mediaType::setSubType(), and mediaType::setType().
| static const string toString | ( | const TYPE & | value | ) | [static] |
Convert the specified value to a string value.
| value | to convert |
Transform all the characters in a string to upper-case.
| str | the string to transform |
Referenced by SASLMechanismFactory::create().
Strip the space characters (SPC, TAB, CR, LF) at the beginning and at the end of the specified string.
| str | string in which to strip spaces |
References parserHelpers::isSpace().
Referenced by maildirStore::isValidFolderName(), mediaType::parse(), and encoding::parse().
Unquote the specified string and transform escaped characters.
| string | from which to remove quotes |
Referenced by encoding::parse().
1.6.2