String manipulation functions.
This module defines several string related functions. Looking at the diversity of string manipulation functions that are provided, you can see that several SimGrid core developers actually like Perl.
◆ XBT_DJB2_HASH_FUNCTION
#define XBT_DJB2_HASH_FUNCTION |
◆ bvprintf()
char* bvprintf |
( |
const char * |
fmt, |
|
|
va_list |
ap |
|
) |
| |
print to allocated string
Similar to vasprintf(), but returns a pointer to the newly created string (or aborts on error).
◆ bprintf()
char* bprintf |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
print to allocated string
Similar to asprintf(), but returns a pointer to the newly created string (or aborts on error).
◆ xbt_str_split()
xbt_dynar_t xbt_str_split |
( |
const char * |
s, |
|
|
const char * |
sep |
|
) |
| |
◆ xbt_str_split_quoted()
◆ xbt_str_split_quoted_in_place()
◆ xbt_str_join_array()
char* xbt_str_join_array |
( |
const char *const * |
strs, |
|
|
const char * |
sep |
|
) |
| |
◆ xbt_str_parse_int()
long int xbt_str_parse_int |
( |
const char * |
str, |
|
|
const char * |
error_mesg |
|
) |
| |
◆ xbt_str_parse_double()
double xbt_str_parse_double |
( |
const char * |
str, |
|
|
const char * |
error_mesg |
|
) |
| |
◆ xbt_str_hash_ext()
static unsigned int xbt_str_hash_ext |
( |
const char * |
str, |
|
|
int |
str_len |
|
) |
| |
|
inlinestatic |
Returns the hash code of a string.
◆ xbt_str_hash()
static unsigned int xbt_str_hash |
( |
const char * |
str | ) |
|
|
inlinestatic |
Returns the hash code of a string.
◆ string_printf()
std::string simgrid::xbt::string_printf |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Create a C++ string from a C-style format.
◆ string_vprintf()
std::string simgrid::xbt::string_vprintf |
( |
const char * |
fmt, |
|
|
va_list |
ap |
|
) |
| |
Create a C++ string from a C-style format.