libcopp
2.2.0
|
Functions | |
template<typename TCH = char> | |
static TCH | tolower (TCH c) |
字符转小写 More... | |
template<typename TCH = char> | |
static TCH | toupper (TCH c) |
字符转大写 More... | |
template<typename T > | |
void | str2int (T &out, const char *str) |
字符串转整数 More... | |
template<typename T > | |
T | to_int (const char *str) |
字符串转整数 More... | |
template<typename TStr , typename TCh > | |
void | hex (TStr *out, TCh c, bool upper_case=false) |
字符转十六进制表示 More... | |
template<typename TStr , typename TCh > | |
void | oct (TStr *out, TCh c) |
字符转8进制表示 More... | |
template<typename TCh > | |
void | serialization (const void *src, size_t ss, TCh *out, size_t &os) |
字符转8进制表示 More... | |
template<typename Elem , typename Traits > | |
void | serialization (const void *src, size_t ss, std::basic_ostream< Elem, Traits > &out) |
字符转8进制表示 More... | |
template<typename TCh > | |
void | dumphex (const void *src, size_t ss, TCh *out, bool upper_case=false) |
字符转16进制表示 More... | |
template<typename Elem , typename Traits > | |
void | dumphex (const void *src, size_t ss, std::basic_ostream< Elem, Traits > &out, bool upper_case=false) |
字符转16进制表示 More... | |
void util::string::dumphex | ( | const void * | src, |
size_t | ss, | ||
std::basic_ostream< Elem, Traits > & | out, | ||
bool | upper_case = false |
||
) |
字符转16进制表示
src | 输入的buffer |
ss | 输入的buffer长度 |
out | 输出缓冲区 |
upper_case | 是否大写 |
Definition at line 264 of file string_oprs.h.
void util::string::dumphex | ( | const void * | src, |
size_t | ss, | ||
TCh * | out, | ||
bool | upper_case = false |
||
) |
字符转16进制表示
src | 输入的buffer |
ss | 输入的buffer长度 |
out | 输出buffer |
upper_case | 是否大写 |
Definition at line 248 of file string_oprs.h.
void util::string::hex | ( | TStr * | out, |
TCh | c, | ||
bool | upper_case = false |
||
) |
字符转十六进制表示
out | 输出的字符串(缓冲区长度至少为2) |
c | 被转换的字符 |
upper_case | 输出大写字符? |
Definition at line 166 of file string_oprs.h.
void util::string::oct | ( | TStr * | out, |
TCh | c | ||
) |
字符转8进制表示
out | 输出的字符串(缓冲区长度至少为3) |
c | 被转换的字符 |
upper_case | 输出大写字符? |
Definition at line 186 of file string_oprs.h.
Referenced by serialization().
void util::string::serialization | ( | const void * | src, |
size_t | ss, | ||
std::basic_ostream< Elem, Traits > & | out | ||
) |
字符转8进制表示
src | 输入的buffer |
ss | 输入的buffer长度 |
out | 输出缓冲区 |
Definition at line 226 of file string_oprs.h.
References oct().
void util::string::serialization | ( | const void * | src, |
size_t | ss, | ||
TCh * | out, | ||
size_t & | os | ||
) |
字符转8进制表示
src | 输入的buffer |
ss | 输入的buffer长度 |
out | 输出buffer |
os | 输出buffer长度,回传输出缓冲区使用的长度 |
Definition at line 200 of file string_oprs.h.
References oct().
void util::string::str2int | ( | T & | out, |
const char * | str | ||
) |
字符串转整数
out | 输出的整数 |
str | 被转换的字符串 |
Definition at line 100 of file string_oprs.h.
References tolower().
Referenced by to_int().
|
inline |
字符串转整数
str | 被转换的字符串 |
Definition at line 153 of file string_oprs.h.
References str2int().
|
static |
字符转小写
c | 字符 |
Definition at line 70 of file string_oprs.h.
Referenced by str2int().
|
static |
字符转大写
c | 字符 |
Definition at line 85 of file string_oprs.h.
Referenced by util::cli::ci_char_traits< Tc >::compare(), util::cli::ci_char_traits< Tc >::eq(), util::cli::ci_char_traits< Tc >::find(), and util::cli::ci_char_traits< Tc >::lt().