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

class  NumericalValueList
 数值解析工具类 更多...
 
class  StringConstList
 

命名空间

namespace  UtilsString
 

宏定义

#define SplitWithChar   SplitWithCharA
 
#define SplitWithText   SplitWithTextA
 

枚举

enum  UtilsString::ChinaPinyinOption { UtilsString::PY_MASK_FULLNAME = 1 , UtilsString::PY_MASK_FIRST_CAPS = 1 << 1 , UtilsString::PY_MASK_ALL_CAPS = 1 << 2 , UtilsString::PY_MASK_INSERT_SPACE = 1 << 3 }
 

函数

UI_EXP bool UtilsString::IsASCIITextA (const char *str, int len=-1)
 判断字符串是否为ASCII
 
UI_EXP bool UtilsString::IsASCIITextW (LPCWSTR str, int len=-1)
 判断字符串是否为ASCII
 
UI_EXP bool UtilsString::IsASCIIText (LPCTSTR str, int len=-1)
 判断字符串是否为ASCII
 
UI_EXP bool UtilsString::IsUTF8 (const char *str)
 判断字符是否是UTF8编码方式
 
UI_EXP bool UtilsString::IsGBK (const char *str)
 判断字符是否是GBK编码方式
 
UI_EXP bool UtilsString::ToMulitLinesA (std::vector< std::string > &lines, const char *str, unsigned int len)
 根据换行符,将字符串转换为多行
 
UI_EXP bool UtilsString::ToNumsA (std::vector< double > &nums, const char *str)
 根据空格符号,将字符串转换为数值数组
 
UI_EXP int UtilsString::ConverterMultiByteToWideChar (UINT CodePage, const char *lpMultiByteStr, int cbMultiByte, WCHAR *lpWideCharStr, int cchWideChar)
 
UI_EXP int UtilsString::ConverterWideCharToMultiByte (UINT CodePage, const WCHAR *lpWideCharStr, int cchWideChar, char *lpMultiByteStr, int cbMultiByte)
 
UI_EXP int UtilsString::CodepointToUtf8 (char *buf, int buf_size, unsigned int code_point)
 convert unicode to utf8
 
UI_EXP int UtilsString::Utf8ToCodepoint (uint32_t *out_char, const char *in_text, const char *in_text_end)
 将utf8字符转换为unicode码点(codepoint)
 
UI_EXP bool UtilsString::Utf16ToCodepoint (uint32_t *out_char, const WCHAR *str, int len)
 将utf16字符转换为unicode码点(codepoint)
 
UI_EXP int UtilsString::ToMultiByte (BasicStringBufferA &outstr, const char *src, int len, UINT cp_from, UINT cp_to)
 格式转换
 
UI_EXP int UtilsString::UnicodeToMultiByte (BasicStringBufferA &outstr, const WCHAR *wc, int len, UINT cp_to=CP_UTF8)
 unicode字符转换为多字符集(GBK,ISO)
 
UI_EXP int UtilsString::MultiByteToUnicode (BasicStringBufferW &outstr, const char *src, int len, UINT cp_from)
 多字符集(GBK,ISO) 转换为unicode字符
 
UI_EXP void UtilsString::UnicodeToChinaPinyin (LPCSTR utf8Str, UINT options, std::string &result)
 转换为拼音
 
UI_EXP BOOL UtilsString::IsLittleEnding ()
 是否是小端模式
 
UI_EXP BOOL UtilsString::IsStackPtr (void *p)
 
UI_EXP BOOL UtilsString::IsDecimalFormateA (const char *str, int len=-1)
 是否满足小数输入格式
 
UI_EXP BOOL UtilsString::IsIntegerA (const char *str, int len=-1)
 
UI_EXP BOOL UtilsString::IsIdentfierA (const char *str, int len=-1)
 
UI_EXP BOOL UtilsString::IsDecimalFormateW (const WCHAR *str, int len=-1)
 是否满足小数输入格式
 
UI_EXP BOOL UtilsString::IsIntegerW (const WCHAR *str, int len=-1)
 
UI_EXP BOOL UtilsString::IsIdentfierW (const WCHAR *str, int len=-1)
 
UI_EXP BOOL UtilsString::IsDecimalFormate (const TCHAR *str, int len=-1)
 是否满足小数输入格式
 
UI_EXP BOOL UtilsString::IsInteger (const TCHAR *str, int len=-1)
 
UI_EXP BOOL UtilsString::IsIdentfier (const TCHAR *str, int len=-1)
 
UI_EXP int UtilsString::GetIntegerCharCount (int v)
 获得整数需要的十进制位数位数
 
UI_EXP int UtilsString::GetCharsCount (LPCTSTR text, int count)
 返回字符个数
 
UI_EXP LPCSTR UtilsString::FindNextBracketA (LPCSTR text, char start_bracket, char end_bracket, int levels=0)
 返回括号分组的结束位置
 
UI_EXP LPCWSTR UtilsString::FindNextBracketW (LPCWSTR text, WCHAR start_bracket, WCHAR end_bracket, int levels=0)
 返回括号分组的结束位置
 
UI_EXP std::vector< std::string > UtilsString::SplitWithCharA (const char *str, const char *pattern, int count=0, BOOL skip_bracket=FALSE)
 字符串分词拆分。单个字符匹配
 
UI_EXP std::vector< std::w16string > UtilsString::SplitWithCharW (const WCHAR *str, const WCHAR *pattern, int count=0, BOOL skip_bracket=FALSE)
 
UI_EXP std::vector< std::string > UtilsString::SplitWithTextA (std::string str, std::string pattern, int count=0)
 字符串分词拆分。字符串匹配
 
UI_EXP std::vector< std::w16string > UtilsString::SplitWithTextW (std::w16string str, std::w16string pattern, int count=0)
 
UI_EXP void UtilsString::SplitAttribute (const TCHAR *text, std::vector< std::pair< std::tstring, std::tstring > > &result, TCHAR SplitCharacter=(TCHAR)';')
 
UI_EXP bool UtilsString::CalculatorValue (double &value, const char *str, int len=-1)
 计算器解析器
 
UI_EXP void UtilsString::ConvertBaseTextToBytes (BasicStringBufferA &out_buf, int &len, LPCTSTR str, int base)
 将基于base进制的字符串转换为字节流
 
UI_EXP void UtilsString::GetPrevDirPath (LPCTSTR fullname, BasicStringBuffer &prev_path)
 获取上级目录
 
UI_EXP void UtilsString::GetPrevDirPathA (LPCSTR fullname, BasicStringBufferA &prev_path)
 
UI_EXP void UtilsString::GetPrevDirPathW (LPCWSTR fullname, BasicStringBufferW &prev_path)
 
UI_EXP void UtilsString::GetFileSuffix (LPCTSTR fullname, BasicStringBuffer &suffix, BOOL isComplete=TRUE)
 获取文件后缀
 
UI_EXP void UtilsString::GetFileSuffixA (LPCSTR fullname, BasicStringBufferA &suffix, BOOL isComplete=TRUE)
 
UI_EXP void UtilsString::GetFileSuffixW (LPCWSTR fullname, BasicStringBufferW &suffix, BOOL isComplete=TRUE)
 
UI_EXP void UtilsString::GetFileBaseName (LPCTSTR fullname, BasicStringBuffer &basename, BOOL isComplete=TRUE)
 获取不包含后缀的文件名
 
UI_EXP void UtilsString::GetFileBaseNameA (LPCSTR fullname, BasicStringBufferA &basename, BOOL isComplete=TRUE)
 
UI_EXP void UtilsString::GetFileBaseNameW (LPCWSTR fullname, BasicStringBufferW &basename, BOOL isComplete=TRUE)
 
UI_EXP void UtilsString::GetFileName (LPCTSTR fullname, BasicStringBuffer &filename)
 获取文件名称
 
UI_EXP void UtilsString::GetFilePath (LPCTSTR fullname, BasicStringBuffer &filepath)
 获取路径,不包含文件
 
UI_EXP void UtilsString::ParseToAlign (UINT &align, LPCTSTR value)
 解析对齐方式
 
UI_EXP void UtilsString::IntToString (int num, int base, BasicStringBuffer &target)
 整数转换为文本。(2,8,10,16 进制)
 
UI_EXP bool UtilsString::ParserNumericalValueA (const char *str, const char *end, char **next_ptr, double &value, int &is_percent_value)
 解析数值。(可识别模式 156.e-2,0b1101,0o154,0x1245,#5421)
 
UI_EXP bool UtilsString::ParserNumericalValueW (const WCHAR *str, const WCHAR *end, WCHAR **next_ptr, double &value, int &is_percent_value)
 
UI_EXP bool UtilsString::ParserNumericalValue (const TCHAR *str, const TCHAR *end, TCHAR **next_ptr, double &value, int &is_percent_value)
 
UI_EXP int UtilsString::ParserToIntA (const char *str, int base=10)
 解析进制整数。(2,8,10,16 进制)
 
UI_EXP int UtilsString::ParserToIntW (const WCHAR *str, int base=10)
 
UI_EXP int UtilsString::ParserToInt (const TCHAR *str, int base=10)
 
UI_EXP double UtilsString::ParserToDoubleA (const char *str, bool ExprRecognition)
 
UI_EXP double UtilsString::ParserToDoubleW (const WCHAR *str, bool ExprRecognition)
 
UI_EXP double UtilsString::ParserToDouble (const TCHAR *str, bool ExprRecognition)
 
UI_EXP PenType UtilsString::ParserPenType (const TCHAR *str)
 解析画笔类型 solid, dot, dash, dash-dot, dash-dot-dot
 
UI_EXP void UtilsString::SkipSpaceOrChar (const char **str, char c)
 跳过指定字符
 
UI_EXP int UtilsString::ParseCsvDoubles (const char *str, double *value, int num_values, char **next)
 解析以逗号分隔的数值
 
UI_EXP int UtilsString::ParseCsvDoublesWChar (const WCHAR *str, double *value, int num_values, WCHAR **next)
 

宏定义说明

◆ SplitWithChar

#define SplitWithChar   SplitWithCharA

◆ SplitWithText

#define SplitWithText   SplitWithTextA
鄂公网安备42018502007752 鄂ICP备2024082886
Copyright © 2025 · CBlueStudio 版权所有