CBlueUI
C++ 跨平台跨框架的数据可视化工具
|
宽字符串UCS2编码(内置引用计数,copy on write)。备注:wchat_t在不同平台下占用字节不一样 更多...
Public 成员函数 | |
BeStringW () | |
BeStringW (int nLength) | |
nLength是预分配长度 | |
BeStringW (const BeStringW &stringSrc) | |
BeStringW (WCHAR ch, int repeats) | |
BeStringW (LPCWSTR lpsz, int nlen=-1) | |
BeStringW (LPCSTR lpsz, int nlen=-1, UINT codepage=CP_ACP) | |
~BeStringW () | |
const WCHAR * | c_str () const |
获得内存数据 | |
const BeStringW & | operator= (const BeStringW &stringSrc) |
const BeStringW & | operator= (LPCWSTR lpsz) |
const BeStringW & | operator= (LPCSTR ansi) |
const BeStringW & | operator= (WCHAR ch) |
BeStringW | operator+ (const BeStringW &src) const |
BeStringW | operator+ (LPCWSTR pstr) const |
const BeStringW & | operator+= (const BeStringW &src) |
const BeStringW & | operator+= (LPCWSTR pstr) |
const BeStringW & | operator+= (const WCHAR ch) |
bool | operator== (const BeStringW &str) const |
bool | operator== (LPCWSTR lpsz) const |
bool | operator!= (const BeStringW &str) const |
bool | operator!= (LPCWSTR lpsz) const |
bool | operator< (const BeStringW &str) const |
bool | operator> (const BeStringW &str) const |
bool | operator<= (const BeStringW &str) const |
bool | operator>= (const BeStringW &str) const |
WCHAR & | operator[] (int nIndex) const |
size_t | length () const |
得到WCHAR字符个数。注意与符号个数区分。在UCS2编码下。稀有字符可能占用2个WCHAR长度 | |
size_t | capacity () const |
得到已经分配的内存字符长度 | |
bool | is_empty () const |
判断字符长度是否为0 | |
bool | is_number () const |
判断是否全部为整数 | |
bool | is_email () |
判断是否是邮箱 | |
bool | is_ipv4 () |
判断是否是IPV4地址 | |
bool | is_ipv6 () |
判断是否是IPV6地址 | |
bool | is_decimal_number () const |
判断是否为小数 | |
bool | is_true () const |
true | |
bool | is_false () const |
false | |
int | repeat_counts (WCHAR ch) |
字符重复的次数 | |
void | empty () |
int | erase (int nIndex, int nCount=1) |
int | append (LPCWSTR lpsz) |
int | append (const WCHAR ch) |
int | append (LPCWSTR lpsz, unsigned int nlen) |
int | append (const BeStringW &strSrc) |
int | append (const BeStringW &strSrc, unsigned int nlen) |
void | append_format (LPCWSTR lpszFormat,...) |
void | convert2Name () |
将特殊字符转换为标识符格式(字母,数字和下划线) | |
void | make_identifier (WCHAR ch='_') |
将不满足标识符的字符用指定字符替换 | |
void | join_path (const WCHAR *wstr) |
int | insert (int nIndex, WCHAR ch) |
在nIndex前面插入 | |
int | insert (int nIndex, LPCWSTR pstr, int len=-1) |
int | replace_char (WCHAR chOld, WCHAR chNew) |
替换 | |
int | replace_string (LPCWSTR lpszOld, LPCWSTR lpszNew) |
int | toInt (bool ExprRecognition=true) const |
转换成数字 | |
double | tofloat (bool ExprRecognition=true) const |
转换 浮点型 | |
void | trim () |
整理字符串, 清除指定字符串 | |
void | trim_left () |
void | trim_right () |
void | remove (WCHAR chTarget) |
void | remove (LPCWSTR lpszTargets) |
void | remove_float_last_zero () |
去除浮点数多余的0后缀 | |
void | make_upper () |
void | make_lower () |
BeStringW | mid (int nStart, int nCount) const |
int | compare (LPCWSTR lpsz) const |
区分大小写 ,<0 表示 自己strself小于lpsz (stringSrc) | |
int | compare (const BeStringW &stringSrc) const |
int | compare_no_case (LPCWSTR lpsz) const |
不区分大小写 | |
int | compare_no_case (const BeStringW &stringSrc) const |
void | format (LPCWSTR lpszFormat,...) |
int | find (WCHAR ch) const |
查找 | |
int | find (WCHAR ch, int nStart) const |
int | reverse_find (WCHAR ch) const |
int | find (LPCWSTR lpszSub) const |
int | find (LPCWSTR lpszSub, int nStart) const |
Public 属性 | |
AtomicLock | m_lock |
宽字符串UCS2编码(内置引用计数,copy on write)。备注:wchat_t在不同平台下占用字节不一样
BeStringW::BeStringW | ( | ) |
BeStringW::BeStringW | ( | int | nLength | ) |
nLength是预分配长度
BeStringW::BeStringW | ( | const BeStringW & | stringSrc | ) |
BeStringW::BeStringW | ( | WCHAR | ch, |
int | repeats | ||
) |
BeStringW::BeStringW | ( | LPCWSTR | lpsz, |
int | nlen = -1 |
||
) |
BeStringW::~BeStringW | ( | ) |
int BeStringW::append | ( | const BeStringW & | strSrc | ) |
int BeStringW::append | ( | const BeStringW & | strSrc, |
unsigned int | nlen | ||
) |
int BeStringW::append | ( | const WCHAR | ch | ) |
int BeStringW::append | ( | LPCWSTR | lpsz | ) |
int BeStringW::append | ( | LPCWSTR | lpsz, |
unsigned int | nlen | ||
) |
void BeStringW::append_format | ( | LPCWSTR | lpszFormat, |
... | |||
) |
const WCHAR * BeStringW::c_str | ( | ) | const |
获得内存数据
size_t BeStringW::capacity | ( | ) | const |
得到已经分配的内存字符长度
int BeStringW::compare | ( | const BeStringW & | stringSrc | ) | const |
int BeStringW::compare | ( | LPCWSTR | lpsz | ) | const |
区分大小写 ,<0 表示 自己strself小于lpsz (stringSrc)
int BeStringW::compare_no_case | ( | const BeStringW & | stringSrc | ) | const |
int BeStringW::compare_no_case | ( | LPCWSTR | lpsz | ) | const |
不区分大小写
void BeStringW::convert2Name | ( | ) |
将特殊字符转换为标识符格式(字母,数字和下划线)
void BeStringW::empty | ( | ) |
int BeStringW::erase | ( | int | nIndex, |
int | nCount = 1 |
||
) |
int BeStringW::find | ( | LPCWSTR | lpszSub | ) | const |
int BeStringW::find | ( | LPCWSTR | lpszSub, |
int | nStart | ||
) | const |
int BeStringW::find | ( | WCHAR | ch | ) | const |
查找
int BeStringW::find | ( | WCHAR | ch, |
int | nStart | ||
) | const |
void BeStringW::format | ( | LPCWSTR | lpszFormat, |
... | |||
) |
int BeStringW::insert | ( | int | nIndex, |
LPCWSTR | pstr, | ||
int | len = -1 |
||
) |
int BeStringW::insert | ( | int | nIndex, |
WCHAR | ch | ||
) |
在nIndex前面插入
bool BeStringW::is_decimal_number | ( | ) | const |
判断是否为小数
bool BeStringW::is_email | ( | ) |
判断是否是邮箱
bool BeStringW::is_empty | ( | ) | const |
判断字符长度是否为0
bool BeStringW::is_false | ( | ) | const |
false
bool BeStringW::is_ipv4 | ( | ) |
判断是否是IPV4地址
bool BeStringW::is_ipv6 | ( | ) |
判断是否是IPV6地址
bool BeStringW::is_number | ( | ) | const |
判断是否全部为整数
bool BeStringW::is_true | ( | ) | const |
true
void BeStringW::join_path | ( | const WCHAR * | wstr | ) |
size_t BeStringW::length | ( | ) | const |
得到WCHAR字符个数。注意与符号个数区分。在UCS2编码下。稀有字符可能占用2个WCHAR长度
void BeStringW::make_identifier | ( | WCHAR | ch = '_' | ) |
将不满足标识符的字符用指定字符替换
void BeStringW::make_lower | ( | ) |
void BeStringW::make_upper | ( | ) |
BeStringW BeStringW::mid | ( | int | nStart, |
int | nCount | ||
) | const |
bool BeStringW::operator!= | ( | const BeStringW & | str | ) | const |
bool BeStringW::operator!= | ( | LPCWSTR | lpsz | ) | const |
bool BeStringW::operator< | ( | const BeStringW & | str | ) | const |
bool BeStringW::operator<= | ( | const BeStringW & | str | ) | const |
bool BeStringW::operator== | ( | const BeStringW & | str | ) | const |
bool BeStringW::operator== | ( | LPCWSTR | lpsz | ) | const |
bool BeStringW::operator> | ( | const BeStringW & | str | ) | const |
bool BeStringW::operator>= | ( | const BeStringW & | str | ) | const |
WCHAR & BeStringW::operator[] | ( | int | nIndex | ) | const |
void BeStringW::remove | ( | LPCWSTR | lpszTargets | ) |
void BeStringW::remove | ( | WCHAR | chTarget | ) |
void BeStringW::remove_float_last_zero | ( | ) |
去除浮点数多余的0后缀
int BeStringW::repeat_counts | ( | WCHAR | ch | ) |
字符重复的次数
int BeStringW::reverse_find | ( | WCHAR | ch | ) | const |
double BeStringW::tofloat | ( | bool | ExprRecognition = true | ) | const |
转换 浮点型
int BeStringW::toInt | ( | bool | ExprRecognition = true | ) | const |
转换成数字
void BeStringW::trim | ( | ) |
整理字符串, 清除指定字符串
void BeStringW::trim_left | ( | ) |
void BeStringW::trim_right | ( | ) |
|
mutable |