System::Char 类

Char class

提供对以 UTF-16 代码单元表示的字符进行操作的方法。这是一个没有实例服务的静态类型。任何情况下都不应创建其实例。

class Char

方法

方法描述
static ConvertFromUtf32(uint32_t)将 UTF-32 代码单元转换为 System::String 类的实例。
static ConvertToUtf32(char_t, char_t)将指定的 UTF-16 代理对转换为 UTF-32 代码单元。
static ConvertToUtf32(const String&, int)将字符串中指定位置的 UTF-16 编码字符或代理对的值转换为 UTF-32 代码单元。
static GetNumericValue(char_t)将指定的 UTF-16 字符转换为双精度浮点数值。
static GetUnicodeCategory(char_t)返回表示指定字符的 Unicode 类别的值。
static IsAsciiWhiteSpace(char_t)确定指定字符是否被归类为 ASCII 空白字符。
static IsControl(const char_t *, int)确定指定字符缓冲区中指定索引处的字符是否被归类为 Unicode 控制字符。
static IsControl(char_t)确定指定字符是否被归类为 Unicode 控制字符。
static IsDigit(const char_t *, int)确定指定字符缓冲区中指定索引处的字符是否被分类为十进制数字。
static IsDigit(const String&, const int32_t)确定指定字符串中指定索引处的字符是否被分类为十进制数字。
static IsDigit(char_t)确定指定字符是否被分类为十进制数字。
static IsHighSurrogate(const String&, int)确定指定字符串中指定索引处的字符是否为 UTF-16 高代理代码单元。
static IsHighSurrogate(const char_t *, int)确定指定字符缓冲区中指定索引处的字符是否为高代理。
static IsHighSurrogate(char_t)确定指定字符是否为高代理。
static IsLetter(const char_t *, int)确定指定字符缓冲区中指定索引处的字符是否被分类为 Unicode 字母。
static IsLetter(char_t)确定指定字符是否被分类为 Unicode 字母。
static IsLetterOrDigit(const char_t *, int)确定指定字符缓冲区中指定索引处的字符是否被分类为 Unicode 字母或十进制数字。
static IsLetterOrDigit(char_t)确定指定字符是否被分类为 Unicode 字母或十进制数字。
static IsLower(const char_t *, int)确定指定字符缓冲区中指定索引处的字符是否被分类为小写字母。
static IsLower(char_t)确定指定字符是否被分类为小写字母。
static IsLower(const String&, int)确定指定字符串中指定索引处的字符是否被分类为小写字母。
static IsLowSurrogate(const char_t *, int)确定指定字符缓冲区中指定索引处的字符是否为低代理。
static IsLowSurrogate(char_t)确定指定字符是否为低代理。
static IsNumber(const char_t *, int)确定指定字符缓冲区中指定索引处的字符是否被分类为数字。
static IsNumber(char_t)确定指定字符是否被分类为数字。
static IsPunctuation(const char_t *, int)确定指定字符缓冲区中指定索引处的字符是否被分类为标点符号。
static IsPunctuation(char_t)确定指定字符是否被分类为标点符号。
static IsSeparator(const char_t *, int)确定指定字符缓冲区中指定索引处的字符是否被分类为分隔符。
static IsSeparator(char_t)确定指定字符是否被分类为分隔符。
static IsSurrogate(char_t)确定指定字符是否为 UTF-16 代理代码单元。
static IsSurrogate(const String&, int)确定指定字符串中指定索引处的字符是否为 UTF-16 代理代码单元。
static IsSurrogatePair(char_t, char_t)确定两个指定字符是否为 UTF-16 代理对。
static IsSurrogatePair(const String&, int)确定指定字符缓冲区中连续的两个字符是否为代理对。
static IsSymbol(const char_t *, int)确定指定字符缓冲区中指定索引处的字符是否被分类为符号字符。
static IsSymbol(char_t)确定指定字符是否被分类为符号字符。
static IsUpper(const String&, int)确定指定字符串中指定索引处的字符是否被分类为大写字母。
static IsUpper(const char_t *, int)确定指定字符缓冲区中指定索引处的字符是否被分类为大写字母。
static IsUpper(char_t)确定指定字符是否被分类为大写字母。
static IsWhiteSpace(const char_t *, int)确定指定字符缓冲区中指定索引处的字符是否被分类为空白字符。
static IsWhiteSpace(char_t)确定指定字符是否被分类为空白字符。
static IsWhiteSpace(const String&, int)确定指定字符串中指定索引处的字符是否被分类为空白字符。
static Parse(const String&)将指定字符串的唯一字符转换为 char_t 值。
static ToLower(char_t)将指定字符转换为小写。
static ToLower(char_t, const SharedPtr<Globalization::CultureInfo>&)将指定字符转换为小写。
static ToLowerInvariant(char_t)将指定字符转换为小写。
static ToUpper(char_t)将指定字符转换为大写。
static ToUpper(char_t, const SharedPtr<Globalization::CultureInfo>&)将指定字符转换为大写。
static ToUpperInvariant(char_t)将指定字符转换为大写。
static TryParse(const System::String&, char_t&)尝试将仅包含单个字符的字符串转换为 UTF-16 字符。仅当输入字符串非空且长度恰好为一个字符时,函数才会成功。

另见