String utilities helper class used internally. You should not use it.
More...
#include <easylogging++.h>
|
static char * | addToBuff (const char *str, char *buf, const char *bufLim) |
|
static char * | clearBuff (char buff[], std::size_t lim) |
|
static bool | contains (const char *str, char c) |
| Returns true if c exist in str. More...
|
|
static char * | convertAndAddToBuff (std::size_t n, int len, char *buf, const char *bufLim, bool zeroPadded=true) |
|
static bool | cStringCaseEq (const char *s1, const char *s2) |
| Compares cstring equality (case-insensitive) - uses toupper(char) Dont use strcasecmp because of CRT (VC++) More...
|
|
static bool | cStringEq (const char *s1, const char *s2) |
| Compares cstring equality - uses strcmp. More...
|
|
static bool | endsWith (const std::string &str, const std::string &end) |
| Determines whether or not str ends with specified string. More...
|
|
static bool | isDigit (char c) |
| Checks if character is digit. Dont use libc implementation of it to prevent locale issues. More...
|
|
static std::string & | ltrim (std::string &str) |
|
static std::string & | replaceAll (std::string &str, char replaceWhat, char replaceWith) |
| Replaces all instances of replaceWhat with 'replaceWith'. Original variable is changed for performance. More...
|
|
static std::string & | replaceAll (std::string &str, const std::string &replaceWhat, const std::string &replaceWith) |
| Replaces all instances of 'replaceWhat' with 'replaceWith'. (String version) Replaces in place. More...
|
|
static void | replaceFirstWithEscape (base::type::string_t &str, const base::type::string_t &replaceWhat, const base::type::string_t &replaceWith) |
|
static std::string & | rtrim (std::string &str) |
|
static bool | startsWith (const std::string &str, const std::string &start) |
| Determines whether or not str starts with specified string. More...
|
|
static std::string & | toUpper (std::string &str) |
| Converts string to uppercase. More...
|
|
static std::string & | trim (std::string &str) |
|
static char * | wcharPtrToCharPtr (const wchar_t *line) |
| Converst wchar* to char* NOTE: Need to free return value after use! More...
|
|
static bool | wildCardMatch (const char *str, const char *pattern) |
| Matches wildcards, '*' and '?' only supported. More...
|
|
String utilities helper class used internally. You should not use it.
Definition at line 1059 of file easylogging++.h.
char * el::base::utils::Str::addToBuff |
( |
const char * |
str, |
|
|
char * |
buf, |
|
|
const char * |
bufLim |
|
) |
| |
|
static |
char * el::base::utils::Str::clearBuff |
( |
char |
buff[], |
|
|
std::size_t |
lim |
|
) |
| |
|
static |
bool el::base::utils::Str::contains |
( |
const char * |
str, |
|
|
char |
c |
|
) |
| |
|
static |
char * el::base::utils::Str::convertAndAddToBuff |
( |
std::size_t |
n, |
|
|
int |
len, |
|
|
char * |
buf, |
|
|
const char * |
bufLim, |
|
|
bool |
zeroPadded = true |
|
) |
| |
|
static |
bool el::base::utils::Str::cStringCaseEq |
( |
const char * |
s1, |
|
|
const char * |
s2 |
|
) |
| |
|
static |
Compares cstring equality (case-insensitive) - uses toupper(char) Dont use strcasecmp because of CRT (VC++)
Definition at line 979 of file easylogging++.cc.
bool el::base::utils::Str::cStringEq |
( |
const char * |
s1, |
|
|
const char * |
s2 |
|
) |
| |
|
static |
Determines whether or not str ends with specified string.
- Parameters
-
str | String to check |
end | String to check against |
- Returns
- Returns true if ends with specified string, false otherwise
Definition at line 925 of file easylogging++.cc.
static bool el::base::utils::Str::isDigit |
( |
char |
c | ) |
|
|
inlinestatic |
Checks if character is digit. Dont use libc implementation of it to prevent locale issues.
Definition at line 1062 of file easylogging++.h.
Replaces all instances of replaceWhat with 'replaceWith'. Original variable is changed for performance.
- Parameters
-
[in,out] | str | String to replace from |
| replaceWhat | Character to replace |
| replaceWith | Character to replace with |
- Returns
- Modified version of str
Definition at line 929 of file easylogging++.cc.
Replaces all instances of 'replaceWhat' with 'replaceWith'. (String version) Replaces in place.
- Parameters
-
str | String to replace from |
replaceWhat | Character to replace |
replaceWith | Character to replace with |
- Returns
- Modified (original) str
Definition at line 934 of file easylogging++.cc.
Determines whether or not str starts with specified string.
- Parameters
-
str | String to check |
start | String to check against |
- Returns
- Returns true if starts with specified string, false otherwise
Definition at line 921 of file easylogging++.cc.
Converts string to uppercase.
- Parameters
-
- Returns
- Uppercase string
Definition at line 965 of file easylogging++.cc.
char * el::base::utils::Str::wcharPtrToCharPtr |
( |
const wchar_t * |
line | ) |
|
|
static |
Converst wchar* to char* NOTE: Need to free return value after use!
Definition at line 1035 of file easylogging++.cc.
bool el::base::utils::Str::wildCardMatch |
( |
const char * |
str, |
|
|
const char * |
pattern |
|
) |
| |
|
static |
Matches wildcards, '*' and '?' only supported.
Definition at line 879 of file easylogging++.cc.
The documentation for this class was generated from the following files: