| long | str2long (const char *str, bool *ok) |
| Convert a string to numeric value. | |
| double | str2float (const char *str, bool *ok) |
| long | str2long (std::string *str, bool *ok) |
| double | str2float (std::string *str, bool *ok) |
Functions | |
| bool | read_line (std::string *str, FILE *file=stdin, bool do_chomp=false) |
| Read a line from a file. | |
| bool | read_string (std::string *str, size_t length, FILE *file=stdin) |
| Read a string of given length from a file. | |
| bool | read_file (std::string *str, FILE *file, size_t length=0) |
| Read a file to string. | |
| void | chomp (std::string *str) |
| Remove the possible trailing newline from a string. | |
| void | clean (std::string *str, const char *chars) |
| Remove leading and trailing characters from a string. | |
| void | split (const std::string *str, const char *delims, bool group, std::vector< std::string > *fields, int num_fields=0) |
| Split a string to fields. | |
| void | split_with_quotes (std::string *str, const char *delims, bool group, std::vector< std::string > *fields) |
| Split a string to fields while processing quotes \, ', ". | |
|
||||||||||||
|
Remove leading and trailing characters from a string.
|
|
||||||||||||||||
|
Read a file to string.
|
|
||||||||||||||||
|
Read a line from a file.
|
|
||||||||||||||||
|
Read a string of given length from a file.
|
|
||||||||||||||||||||||||
|
Split a string to fields.
If
|
|
||||||||||||||||||||
|
Split a string to fields while processing quotes \, ', ".
The function modifies
|
|
||||||||||||
|
Convert a string to numeric value.
|
1.4.6