23 extern std::string
format(
const char *fmt, ...);
24 extern void formats(std::string& sbuf,
const char *fmt, ...);
32 extern std::string
size_to_str(
unsigned long sz,
int prec = 1,
int select = 0);
40 extern std::string
number_to_str(
unsigned long num,
int prec = 1,
int select = 0);
46 extern bool str_to_int(
const char* val,
int* res);
52 extern bool str_to_lint(
const char* val,
long* res);
59 extern bool str_to_uint(
const char* val,
unsigned* res);
66 extern bool str_to_luint(
const char* val,
long unsigned* res);
78 extern bool str_to_bool(
const char* val,
bool* res);
85 extern std::string
replace_all(
const std::string &str,
const std::string &match,
const std::string &replace);
std::string replace_all(const std::string &str, const std::string &match, const std::string &replace)
Replace all matches in the string.
bool str_to_uint(const char *val, unsigned *res)
Convert string to unsigned integer value One could use hexadecimal (in form 0xabc100) or decimal form...
void formats(std::string &sbuf, const char *fmt,...)
bool str_to_double(const char *val, double *res)
Convert string to double value.
std::string format(const char *fmt,...)
std::string size_to_str(unsigned long sz, int prec=1, int select=0)
Convert size to string of form like 4.2 GB or 3.7 MB.
std::string number_to_str(unsigned long num, int prec=1, int select=0)
Convert number to string of form like 4.2G or 3.7M.
bool str_to_lint(const char *val, long *res)
Convert string to long integer value.
bool str_to_luint(const char *val, long unsigned *res)
Convert string to long unsigned integer value One could use hexadecimal (in form 0xabc100) or decimal...
bool str_to_bool(const char *val, bool *res)
Convert string to bool value.
bool str_to_int(const char *val, int *res)
Convert string to integer value.