SimGrid  3.21
Versatile Simulation of Distributed Systems

Detailed Description

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.

Macros

#define XBT_DJB2_HASH_FUNCTION
 

Functions

char * bvprintf (const char *fmt, va_list ap)
 print to allocated string More...
 
char * bprintf (const char *fmt,...) XBT_ATTRIB_PRINTF(1
 print to allocated string More...
 
xbt_dynar_t xbt_str_split (const char *s, const char *sep)
 
xbt_dynar_t xbt_str_split_quoted (const char *s)
 
xbt_dynar_t xbt_str_split_quoted_in_place (char *s)
 
char * xbt_str_join_array (const char *const *strs, const char *sep)
 
long int xbt_str_parse_int (const char *str, const char *error_mesg)
 
double xbt_str_parse_double (const char *str, const char *error_mesg)
 
static unsigned int xbt_str_hash_ext (const char *str, int str_len)
 Returns the hash code of a string. More...
 
static unsigned int xbt_str_hash (const char *str)
 Returns the hash code of a string. More...
 
std::string simgrid::xbt::string_printf (const char *fmt,...)
 Create a C++ string from a C-style format. More...
 
std::string simgrid::xbt::string_vprintf (const char *fmt, va_list ap)
 Create a C++ string from a C-style format. More...
 

Macro Definition Documentation

◆ XBT_DJB2_HASH_FUNCTION

#define XBT_DJB2_HASH_FUNCTION

Function Documentation

◆ 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_dynar_t xbt_str_split_quoted ( const char *  s)

◆ xbt_str_split_quoted_in_place()

xbt_dynar_t xbt_str_split_quoted_in_place ( char *  s)

◆ xbt_str_join_array()

char* xbt_str_join_array ( const char *const *  strs,
const char *  sep 
)

◆ xbt_str_parse_int()

◆ 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.