CBlueUI  
C++ 跨平台跨框架的数据可视化工具
载入中...
搜索中...
未找到
BeStringW类 参考

宽字符串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 WCHARc_str () const
 获得内存数据
 
const BeStringWoperator= (const BeStringW &stringSrc)
 
const BeStringWoperator= (LPCWSTR lpsz)
 
const BeStringWoperator= (LPCSTR ansi)
 
const BeStringWoperator= (WCHAR ch)
 
BeStringW operator+ (const BeStringW &src) const
 
BeStringW operator+ (LPCWSTR pstr) const
 
const BeStringWoperator+= (const BeStringW &src)
 
const BeStringWoperator+= (LPCWSTR pstr)
 
const BeStringWoperator+= (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
 
WCHARoperator[] (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() [1/6]

BeStringW::BeStringW ( )

◆ BeStringW() [2/6]

BeStringW::BeStringW ( int  nLength)

nLength是预分配长度

◆ BeStringW() [3/6]

BeStringW::BeStringW ( const BeStringW stringSrc)

◆ BeStringW() [4/6]

BeStringW::BeStringW ( WCHAR  ch,
int  repeats 
)

◆ BeStringW() [5/6]

BeStringW::BeStringW ( LPCWSTR  lpsz,
int  nlen = -1 
)

◆ BeStringW() [6/6]

BeStringW::BeStringW ( LPCSTR  lpsz,
int  nlen = -1,
UINT  codepage = CP_ACP 
)

◆ ~BeStringW()

BeStringW::~BeStringW ( )

成员函数说明

◆ append() [1/5]

int BeStringW::append ( const BeStringW strSrc)

◆ append() [2/5]

int BeStringW::append ( const BeStringW strSrc,
unsigned int  nlen 
)

◆ append() [3/5]

int BeStringW::append ( const WCHAR  ch)

◆ append() [4/5]

int BeStringW::append ( LPCWSTR  lpsz)

◆ append() [5/5]

int BeStringW::append ( LPCWSTR  lpsz,
unsigned int  nlen 
)

◆ append_format()

void BeStringW::append_format ( LPCWSTR  lpszFormat,
  ... 
)

◆ c_str()

const WCHAR * BeStringW::c_str ( ) const

获得内存数据

◆ capacity()

size_t BeStringW::capacity ( ) const

得到已经分配的内存字符长度

◆ compare() [1/2]

int BeStringW::compare ( const BeStringW stringSrc) const

◆ compare() [2/2]

int BeStringW::compare ( LPCWSTR  lpsz) const

区分大小写 ,<0 表示 自己strself小于lpsz (stringSrc)

◆ compare_no_case() [1/2]

int BeStringW::compare_no_case ( const BeStringW stringSrc) const

◆ compare_no_case() [2/2]

int BeStringW::compare_no_case ( LPCWSTR  lpsz) const

不区分大小写

◆ convert2Name()

void BeStringW::convert2Name ( )

将特殊字符转换为标识符格式(字母,数字和下划线)

◆ empty()

void BeStringW::empty ( )

◆ erase()

int BeStringW::erase ( int  nIndex,
int  nCount = 1 
)

◆ find() [1/4]

int BeStringW::find ( LPCWSTR  lpszSub) const

◆ find() [2/4]

int BeStringW::find ( LPCWSTR  lpszSub,
int  nStart 
) const

◆ find() [3/4]

int BeStringW::find ( WCHAR  ch) const

查找

◆ find() [4/4]

int BeStringW::find ( WCHAR  ch,
int  nStart 
) const

◆ format()

void BeStringW::format ( LPCWSTR  lpszFormat,
  ... 
)

◆ insert() [1/2]

int BeStringW::insert ( int  nIndex,
LPCWSTR  pstr,
int  len = -1 
)

◆ insert() [2/2]

int BeStringW::insert ( int  nIndex,
WCHAR  ch 
)

在nIndex前面插入

◆ is_decimal_number()

bool BeStringW::is_decimal_number ( ) const

判断是否为小数

◆ is_email()

bool BeStringW::is_email ( )

判断是否是邮箱

◆ is_empty()

bool BeStringW::is_empty ( ) const

判断字符长度是否为0

◆ is_false()

bool BeStringW::is_false ( ) const

false

◆ is_ipv4()

bool BeStringW::is_ipv4 ( )

判断是否是IPV4地址

◆ is_ipv6()

bool BeStringW::is_ipv6 ( )

判断是否是IPV6地址

◆ is_number()

bool BeStringW::is_number ( ) const

判断是否全部为整数

◆ is_true()

bool BeStringW::is_true ( ) const

true

◆ join_path()

void BeStringW::join_path ( const WCHAR wstr)

◆ length()

size_t BeStringW::length ( ) const

得到WCHAR字符个数。注意与符号个数区分。在UCS2编码下。稀有字符可能占用2个WCHAR长度

◆ make_identifier()

void BeStringW::make_identifier ( WCHAR  ch = '_')

将不满足标识符的字符用指定字符替换

◆ make_lower()

void BeStringW::make_lower ( )

◆ make_upper()

void BeStringW::make_upper ( )

◆ mid()

BeStringW BeStringW::mid ( int  nStart,
int  nCount 
) const

◆ operator!=() [1/2]

bool BeStringW::operator!= ( const BeStringW str) const

◆ operator!=() [2/2]

bool BeStringW::operator!= ( LPCWSTR  lpsz) const

◆ operator+() [1/2]

BeStringW BeStringW::operator+ ( const BeStringW src) const

◆ operator+() [2/2]

BeStringW BeStringW::operator+ ( LPCWSTR  pstr) const

◆ operator+=() [1/3]

const BeStringW & BeStringW::operator+= ( const BeStringW src)

◆ operator+=() [2/3]

const BeStringW & BeStringW::operator+= ( const WCHAR  ch)

◆ operator+=() [3/3]

const BeStringW & BeStringW::operator+= ( LPCWSTR  pstr)

◆ operator<()

bool BeStringW::operator< ( const BeStringW str) const

◆ operator<=()

bool BeStringW::operator<= ( const BeStringW str) const

◆ operator=() [1/4]

const BeStringW & BeStringW::operator= ( const BeStringW stringSrc)

◆ operator=() [2/4]

const BeStringW & BeStringW::operator= ( LPCSTR  ansi)

◆ operator=() [3/4]

const BeStringW & BeStringW::operator= ( LPCWSTR  lpsz)

◆ operator=() [4/4]

const BeStringW & BeStringW::operator= ( WCHAR  ch)

◆ operator==() [1/2]

bool BeStringW::operator== ( const BeStringW str) const

◆ operator==() [2/2]

bool BeStringW::operator== ( LPCWSTR  lpsz) const

◆ operator>()

bool BeStringW::operator> ( const BeStringW str) const

◆ operator>=()

bool BeStringW::operator>= ( const BeStringW str) const

◆ operator[]()

WCHAR & BeStringW::operator[] ( int  nIndex) const

◆ remove() [1/2]

void BeStringW::remove ( LPCWSTR  lpszTargets)

◆ remove() [2/2]

void BeStringW::remove ( WCHAR  chTarget)

◆ remove_float_last_zero()

void BeStringW::remove_float_last_zero ( )

去除浮点数多余的0后缀

◆ repeat_counts()

int BeStringW::repeat_counts ( WCHAR  ch)

字符重复的次数

◆ replace_char()

int BeStringW::replace_char ( WCHAR  chOld,
WCHAR  chNew 
)

替换

◆ replace_string()

int BeStringW::replace_string ( LPCWSTR  lpszOld,
LPCWSTR  lpszNew 
)

◆ reverse_find()

int BeStringW::reverse_find ( WCHAR  ch) const

◆ tofloat()

double BeStringW::tofloat ( bool  ExprRecognition = true) const

转换 浮点型

◆ toInt()

int BeStringW::toInt ( bool  ExprRecognition = true) const

转换成数字

◆ trim()

void BeStringW::trim ( )

整理字符串, 清除指定字符串

◆ trim_left()

void BeStringW::trim_left ( )

◆ trim_right()

void BeStringW::trim_right ( )

类成员变量说明

◆ m_lock

AtomicLock BeStringW::m_lock
mutable
鄂公网安备42018502007752 鄂ICP备2024082886
Copyright © 2025 · CBlueStudio 版权所有