Foxit PDF SDK
CFX_WideString类 参考

宽字符串类 更多...

继承自 CFX_Object .

Public 成员函数

 CFX_WideString ()
 构造空的宽字符串。
 
 CFX_WideString (const CFX_WideString &str)
 复制构造函数。 更多...
 
 CFX_WideString (const CFX_WideStringC &str)
 从CFX_WideStringC对象的常量引用构造。 更多...
 
 CFX_WideString (const CFX_WideStringC &str1, const CFX_WideStringC &str2)
 连接构造函数。 更多...
 
 CFX_WideString (FX_LPCWSTR ptr, FX_STRSIZE len=-1)
 从宽字符字符串构造。 更多...
 
 CFX_WideString (FX_WCHAR ch)
 从单个宽字符构造。 更多...
 
 ~CFX_WideString ()
 析构函数。
 
int Compare (const CFX_WideString &str) const
 将字符串与另一个字符串进行比较。区分大小写。 更多...
 
int Compare (FX_LPCWSTR str) const
 将当前字符串与宽字符字符串进行比较。区分大小写。 更多...
 
int CompareNoCase (FX_LPCWSTR str) const
 将字符串与宽字符字符串进行比较。不区分大小写。 更多...
 
void ConvertFrom (const CFX_ByteString &str, CFX_CharMap *pCharMap=NULL)
 使用指定的字符映射器将MBCS数据加载到此宽字符串中。 更多...
 
FX_STRSIZE Delete (FX_STRSIZE index, FX_STRSIZE count=1)
 从指定位置开始删除一个或多个宽字符。 更多...
 
void Empty ()
 将此字符串设置为空。 更多...
 
bool Equal (const CFX_WideStringC &str) const
 检查当前字符串是否等于另一个字符串。 更多...
 
FX_STRSIZE Find (FX_LPCWSTR lpszSub, FX_STRSIZE start=0) const
 从指定位置查找子字符串。只找到第一次出现。 更多...
 
FX_STRSIZE Find (FX_WCHAR ch, FX_STRSIZE start=0) const
 从指定位置查找字符。只找到第一次出现。 更多...
 
void Format (FX_LPCWSTR lpszFormat,...)
 将多个参数格式化到此宽字符串中。 更多...
 
void FormatV (FX_LPCWSTR lpszFormat, va_list argList)
 使用va_list将多个参数格式化到此宽字符串中。 更多...
 
FX_WCHAR GetAt (FX_STRSIZE nIndex) const
 检索由索引号指定的单个宽字符。 更多...
 
FX_LPWSTR GetBuffer (FX_STRSIZE len)
 获取已分配指定数量字符的缓冲区。 更多...
 
FX_FLOAT GetFloat () const
 转换为其他数据类型。 更多...
 
int GetInteger () const
 转换为其他数据类型。 更多...
 
FX_STRSIZE GetLength () const
 获取字符数,不是字节数。不计算尾随零。 更多...
 
FX_STRSIZE Insert (FX_STRSIZE index, FX_WCHAR ch)
 在指定位置之前插入宽字符。 更多...
 
FX_BOOL IsEmpty () const
 检查当前字符串对象是否为空。 更多...
 
CFX_WideString Left (FX_STRSIZE count) const
 从此CFX_WideString对象中提取前(最左边)count个宽字符作为子字符串。 更多...
 
FX_LPWSTR LockBuffer ()
 锁定并获取当前字符串缓冲区,以便调用者可以修改返回的缓冲区。 调用者可以修改返回的缓冲区,并在修改完成后调用CFX_WideString::ReleaseBuffer更多...
 
void MakeLower ()
 将英文字母的大小写更改为小写。 更多...
 
void MakeUpper ()
 将英文字母的大小写更改为大写。 更多...
 
CFX_WideString Mid (FX_STRSIZE first) const
 从此CFX_WideString对象中提取子字符串,从位置nFirst(零基)开始到结束。 更多...
 
CFX_WideString Mid (FX_STRSIZE first, FX_STRSIZE count) const
 从此CFX_WideString对象中提取count个宽字符的子字符串, 从位置nFirst(零基)开始到结束。 更多...
 
 operator FX_LPCWSTR () const
 FX_LPCWSTR类型转换操作符。
 
const CFX_WideStringoperator+= (const CFX_WideString &str)
 连接(+=)运算符重载。连接宽字符串。 更多...
 
const CFX_WideStringoperator+= (const CFX_WideStringC &str)
 连接(+=)运算符重载。连接常量宽字符串。 更多...
 
const CFX_WideStringoperator+= (FX_LPCWSTR str)
 连接(+=)运算符重载。连接宽字符字符串。 更多...
 
const CFX_WideStringoperator+= (FX_WCHAR ch)
 连接(+=)运算符重载。连接单个宽字符。 更多...
 
const CFX_WideStringoperator= (const CFX_WideString &stringSrc)
 赋值(=)运算符重载。来自宽字符串。 更多...
 
const CFX_WideStringoperator= (const CFX_WideStringC &stringSrc)
 赋值(=)运算符重载。来自常量宽字符串。 更多...
 
const CFX_WideStringoperator= (FX_LPCWSTR str)
 赋值(=)运算符重载。来自宽字符字符串。 更多...
 
FX_WCHAR operator[] (FX_STRSIZE nIndex) const
 下标([])运算符重载。它检索由nIndex中零基索引指定的宽字符。 更多...
 
void ReleaseBuffer (FX_STRSIZE len=-1)
 释放由函数CFX_WideString::GetBufferCFX_WideString::LockBuffer获取的缓冲区,并设置修改后字符串的长度。 更多...
 
FX_STRSIZE Remove (FX_WCHAR ch)
 移除特定字符的所有出现。 更多...
 
FX_STRSIZE Replace (FX_LPCWSTR lpszOld, FX_LPCWSTR lpszNew)
 用新的子字符串替换字符串中的所有模式。 更多...
 
void Reserve (FX_STRSIZE len)
 保留可容纳指定数量字符的缓冲区。 更多...
 
CFX_WideString Right (FX_STRSIZE count) const
 从此CFX_WideString对象中提取最后(最右边)count个宽字符作为子字符串。 更多...
 
void SetAt (FX_STRSIZE nIndex, FX_WCHAR ch)
 覆写由索引号指定的单个宽字符。 更多...
 
void TrimLeft ()
 从宽字符串的左侧修剪空白字符。 更多...
 
void TrimLeft (FX_LPCWSTR lpszTargets)
 从宽字符串的左侧修剪指定字符集的连续出现。 更多...
 
void TrimLeft (FX_WCHAR chTarget)
 从宽字符串的左侧修剪指定字符的连续出现。 更多...
 
void TrimRight ()
 从宽字符串的右侧修剪空白字符。 更多...
 
void TrimRight (FX_LPCWSTR lpszTargets)
 从宽字符串的右侧修剪指定字符集的连续出现。 更多...
 
void TrimRight (FX_WCHAR chTarget)
 从宽字符串的右侧修剪指定字符的连续出现。 更多...
 
CFX_ByteString UTF16LE_Encode (FX_BOOL bTerminate=true) const
 进行UTF16LE编码。 更多...
 
CFX_ByteString UTF8Encode () const
 进行UTF8编码。 更多...
 

静态 Public 成员函数

static CFX_WideString FromLocal (const char *str, FX_STRSIZE len=-1)
 从系统多字节字符集创建宽字符串。 更多...
 
static CFX_WideString FromUTF16BE (const unsigned short *str, FX_STRSIZE len=-1)
 从UTF16BE编码字符串创建宽字符串。 更多...
 
static CFX_WideString FromUTF16LE (const unsigned short *str, FX_STRSIZE len=-1)
 从UTF16LE编码字符串创建宽字符串。 更多...
 
static CFX_WideString FromUTF8 (const char *str, FX_STRSIZE len=-1)
 从UTF-8字符串(ASCII字符串兼容)创建宽字符串。 更多...
 
static FX_STRSIZE WStringLength (const unsigned short *str)
 字符串的长度。 更多...
 

详细描述

宽字符串类

在Windows平台上,宽字符串由UTF-16LE编码表示; 在Unix/Linux平台上,宽字符串由UCS-4编码表示。