String-related utilities. More...
Classes | |
class | StringHash |
class | StringEqual |
Functions | |
std::string DLLPUBLIC | format (const char *fmt,...) OPENIMAGEIO_PRINTF_ARGS(1 |
std::string DLLPUBLIC std::string DLLPUBLIC | vformat (const char *fmt, va_list ap) OPENIMAGEIO_PRINTF_ARGS(1 |
std::string DLLPUBLIC std::string DLLPUBLIC std::string DLLPUBLIC | memformat (off_t bytes, int digits=3) |
std::string DLLPUBLIC | timeintervalformat (double secs, int digits=1) |
unsigned int | strhash (const char *s) |
String-related utilities.
std::string DLLPUBLIC Strutil::format | ( | const char * | fmt, | |
... | ||||
) |
Return a std::string formatted from printf-like arguments.
std::string DLLPUBLIC std::string DLLPUBLIC std::string DLLPUBLIC Strutil::memformat | ( | off_t | bytes, | |
int | digits = 3 | |||
) |
Return a string expressing a number of bytes, in human readable form.
unsigned int Strutil::strhash | ( | const char * | s | ) | [inline] |
Beautiful little string hasher from Aho, Sethi, and Ullman's 1986 Dragon compiler book. This depends on sizeof(unsigned int) == 4.
std::string DLLPUBLIC Strutil::timeintervalformat | ( | double | secs, | |
int | digits = 1 | |||
) |
Return a string expressing an elapsed time, in human readable form. e.g. "0:35.2"
std::string DLLPUBLIC std::string DLLPUBLIC Strutil::vformat | ( | const char * | fmt, | |
va_list | ap | |||
) |
Return a std::string formatted from printf-like arguments -- passed already as a va_list.