15 using std::ostringstream;
20 if( input.find_first_not_of(
" \n") != 0)
21 input.erase( 0, input.find_first_not_of(
" \n") );
23 if( input.find_last_not_of(
" \n") != input.length() )
24 input.erase( input.find_last_not_of(
" \n")+1, input.length() );
41 vector<string> string_parts;
43 while(input.find_first_of(delimiter) < input.length()) {
45 string_parts.push_back( input.substr(0, input.find_first_of(delimiter)) );
46 input = input.substr(input.find_first_of(delimiter)+1, input.length());
48 string_parts.push_back(input);
57 string trimmed = input;
59 string::size_type pos = 0;
61 while( (pos = trimmed.find_first_of(
" ", pos)) != string::npos ) {
62 if( trimmed[++pos] ==
' ' ) trimmed.erase(pos--,1);
68 string& subject,
const string& search,
const string& replace)
72 while ((pos = subject.find(search, pos)) != std::string::npos) {
73 subject.replace(pos, search.length(), replace);
75 pos += replace.length();
83 string filtered_string = input;
84 string::size_type pos = 0;
86 while( (pos = filtered_string.find_first_of(
87 filt_elements, pos)) != string::npos )
88 filtered_string.erase(pos,1);
89 return filtered_string;
94 for(
unsigned int i=0; i<input.size(); i++) input[i] = toupper(input[i]);
100 for(
unsigned int i=0; i<input.size(); i++) input[i] = tolower(input[i]);
string ToLower(string input)
string IntAsString(int i)
string RemoveSuccessiveSpaces(string input)
string TrimSpaces(string input)
string FilterString(string filt, string input)
vector< string > Split(string input, string delim)
string ToUpper(string input)
void ReplaceStringInPlace(string &subject, const string &search, const string &replace)