#include <util.h>
Static Public Member Functions | |
static double | decimals (double d) |
Return power(10,number of decimal positions). | |
static const char * | find_sep (const char *start, char sep) |
Find a char separator. | |
static const char * | find_sep2 (const char *start, char sep1, char sep2) |
Find one out of two char separators. | |
static const char * | find_sep3 (const char *start, char sep1, char sep2, char sep3) |
Find one out of three char separators. | |
static bool | is_number (const char *s, double *res) |
True if parsing a number. | |
static char * | remove_spaces (const char *s, const char *e=NULL) |
Remove all spaces in a string. | |
static char * | strcpya (const char *s, size_t n) |
A version of strcpy. | |
static char * | strcpya (const char *s) |
A version of strcpy. | |
static string | tostr (double f) |
Return a string representation of a number. | |
static char * | trim (const char *s) |
Remove left and right spaces. |
static double util::string_util::decimals | ( | double | d | ) | [inline, static] |
Return power(10,number of decimal positions).
static const char* util::string_util::find_sep | ( | const char * | start, | |
char | sep | |||
) | [inline, static] |
Find a char separator.
static const char* util::string_util::find_sep2 | ( | const char * | start, | |
char | sep1, | |||
char | sep2 | |||
) | [inline, static] |
Find one out of two char separators.
static const char* util::string_util::find_sep3 | ( | const char * | start, | |
char | sep1, | |||
char | sep2, | |||
char | sep3 | |||
) | [inline, static] |
Find one out of three char separators.
static bool util::string_util::is_number | ( | const char * | s, | |
double * | res | |||
) | [inline, static] |
True if parsing a number.
static char* util::string_util::remove_spaces | ( | const char * | s, | |
const char * | e = NULL | |||
) | [inline, static] |
Remove all spaces in a string.
static char* util::string_util::strcpya | ( | const char * | s, | |
size_t | n | |||
) | [inline, static] |
A version of strcpy.
It differs from strncpy in allocating the needed memory.
s | source C string. | |
n | max characters. |
static char* util::string_util::strcpya | ( | const char * | s | ) | [inline, static] |
A version of strcpy.
It differs from strncpy in allocating the needed memory.
s | source C string. |
static string util::string_util::tostr | ( | double | f | ) | [inline, static] |
Return a string representation of a number.
static char* util::string_util::trim | ( | const char * | s | ) | [inline, static] |
Remove left and right spaces.