PUMA Library Reference Manual
|
#include <Puma/StrCol.h>
Collection of string helper functions.
Static Public Member Functions | |
static bool | isSpace (const char c) |
Check if the given character is one of: | |
static bool | onlySpaces (const char *str) |
Check if the given string only contains space characters as recognized by isSpace(). | |
static bool | effectivelyDifferent (const char *str1, const char *str2) |
Check if the two strings differ not only in spaces. | |
static char * | dup (const char *str) |
Copy a string. | |
static char * | dup (const char *str, int n) |
Copy the first n characters of a string. | |
static unsigned int | hash (const char *str) |
Calculate a hash value for a string using the Hsieh algorithm. | |
static unsigned int | hash (const char *str, int n) |
Calculate a hash value for the first n characters of a string using the Hsieh algorithm. | |
static std::string & | replaceEnvironmentVariables (std::string &str) |
Replace environment variables of the form ${ENVVAR} in the given string. | |
|
static |
Copy a string.
str | The string to copy. |
|
static |
Copy the first n characters of a string.
str | The string to copy. |
n | The number of characters to copy. |
|
static |
Check if the two strings differ not only in spaces.
str1 | The first string. |
str2 | The second string. |
|
static |
Calculate a hash value for a string using the Hsieh algorithm.
str | The input string. |
|
static |
Calculate a hash value for the first n characters of a string using the Hsieh algorithm.
str | The input string. |
n | The number of characters to consider for the hash value. |
|
static |
Check if the given character is one of:
c | The character to check. |
|
static |
Check if the given string only contains space characters as recognized by isSpace().
str | The string to check. |
|
static |
Replace environment variables of the form ${ENVVAR} in the given string.
str | A reference to the string containing the environment variables. |