System::Char::IsSurrogatePair 方法

Char::IsSurrogatePair(char_t, char_t) method

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

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

ReturnValue

如果指定字符构成代理对则返回 true;否则返回 false。

另见

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

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

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

ReturnValue

如果指定的字符是代理对,则为 True,否则 - false

另见