System::Char::IsSurrogatePair 方法

Char::IsSurrogatePair(char_t, char_t) method

确定两个指定字符是否为 UTF-16 代理对。

static bool System::Char::IsSurrogatePair(char_t highSurrogate, char_t lowSurrogate)
参数类型描述
highSurrogatechar_t用于测试是否为高位代理的字符
lowSurrogatechar_t用于测试是否为低位代理的字符

ReturnValue

如果指定字符形成代理对,则为 true,否则为 false

另见

Char::IsSurrogatePair(const String&, int) method

确定指定字符缓冲区中连续的两个字符是否为代理对。

static bool System::Char::IsSurrogatePair(const String &str, int index)
参数类型描述
strconst String&字符串
索引int在指定缓冲区中测试字符序列开始的零基索引

ReturnValue

如果指定字符是代理对,则为 true,否则为 false

另见