45 #ifndef _private_strlib_h 46 #define _private_strlib_h 60 string boolToString(
bool b);
65 string boolToString(
int b);
72 int charToInteger(
char c);
78 string charToString(
char c);
83 bool contains(
const string& s,
char ch);
88 bool contains(
const string& s,
const string& substring);
96 string doubleToString(
double d);
102 bool endsWith(
const string& str,
const string& suffix);
108 bool endsWith(
const string& str,
char suffix);
114 bool equalsIgnoreCase(
const string& s1,
const string& s2);
123 string htmlDecode(
const string& s);
131 string htmlEncode(
const string& s);
139 int indexOf(
const string& s,
char ch,
int startIndex = 0);
147 int indexOf(
const string& s,
const string& substring,
int startIndex = 0);
155 char integerToChar(
int n);
162 string integerToString(
int n,
int radix = 10);
170 string join(
const std::vector<string>& v,
char delimiter =
'\n');
178 string join(
const std::vector<string>& v,
const string& delimiter =
"\n");
186 int lastIndexOf(
const string& s,
char ch,
int startIndex = (
int) string::npos);
194 int lastIndexOf(
const string& s,
const string& substring,
int startIndex = (
int) string::npos);
201 string longToString(
long n,
int radix = 10);
213 string padLeft(
const string& s,
int length,
char fill =
' ');
225 string padRight(
const string& s,
int length);
231 string pointerToString(
void* p);
238 string realToString(
double d);
248 string replace(
const string& str,
char old,
char replacement,
int limit = -1);
258 string replace(
const string& str,
const string& old,
const string& replacement,
int limit = -1);
264 int replaceInPlace(string& str,
char old,
char replacement,
int limit = -1);
270 int replaceInPlace(string& str,
const string& old,
const string& replacement,
int limit = -1);
278 std::vector<string> split(
const string& str,
char delimiter,
int limit = -1);
286 std::vector<string> split(
const string& str,
const string& delimiter,
int limit = -1);
292 bool startsWith(
const string& str,
char prefix);
298 bool startsWith(
const string& str,
const string& prefix);
303 bool stringIsBool(
const string& str);
311 bool stringIsDouble(
const string& str);
319 bool stringIsInteger(
const string& str,
int radix = 10);
327 bool stringIsLong(
const string& str,
int radix = 10);
334 bool stringIsReal(
const string& str);
341 bool stringToBool(
const string& str);
348 char stringToChar(
const string& str);
357 double stringToDouble(
const string& str);
367 int stringToInteger(
const string& str,
int radix = 10);
377 long stringToLong(
const string& str,
int radix = 10);
386 double stringToReal(
const string& str);
392 char toLowerCase(
char ch);
398 string toLowerCase(
const string& str);
404 void toLowerCaseInPlace(string& str);
410 char toUpperCase(
char ch);
416 string toUpperCase(
const string& str);
422 void toUpperCaseInPlace(string& str);
428 string trim(
const string& str);
434 void trimInPlace(string& str);
440 string trimEnd(
const string& str);
446 void trimEndInPlace(string& str);
452 string trimStart(
const string& str);
458 void trimStartInPlace(string& str);
464 string urlDecode(
const string& str);
470 void urlDecodeInPlace(string& str);
476 string urlEncode(
const string& str);
482 void urlEncodeInPlace(string& str);
497 bool stob(
const string& str);
505 char stoc(
const string& str);
527 template <
typename T>
529 std::ostringstream out;
535 #endif // _private_strlib_h
string to_string(const GTableIndex &value)
Returns a string representation of this location, such as "r2c17".
Definition: gtable.cpp:1064