Lines Matching refs:string
21 * \brief String utilities.
34 using std::string;
62 //! Convert string to lowercase using the classic "C" locale
63 string toLower (const string& str)
65 string ret;
70 //! Convert string to uppercase using the classic "C" locale
71 string toUpper (const string& str)
73 string ret;
78 //! Convert string's first character to uppercase using the classic "C" locale
79 string capitalize (const string& str)
86 //! Split a string into tokens. If `delim` is `'\0'`, separate by spans of
89 vector<string> splitString (const string& s, char delim)
94 return vector<string>(istream_iterator<string>(tokenStream),
95 istream_iterator<string>());
98 vector<string> ret;
99 string token;
108 //! Convert floating-point value to string with fixed number of fractional decimals.
109 std::string floatToString (float val, int precision)
150 vector <string> tokens(splitString(" foo bar\n\tbaz "));