Char..::..IsSurrogatePair Method (String, Int32)
Indicates whether two adjacent Char objects at a specified position in a string form a surrogate pair.
Namespace:
SystemAssembly: Bridge (in Bridge.dll)
Syntax
[TemplateAttribute] public static bool IsSurrogatePair( string s, int index )
<TemplateAttribute> _ Public Shared Function IsSurrogatePair ( _ s As String, _ index As Integer _ ) As Boolean
[TemplateAttribute] public: static bool^ IsSurrogatePair( String^ s, int^ index )
Parameters
- s
- Type: System..::..String
A string.
- index
- Type: System..::..Int32
The starting position of the pair of characters to evaluate within s.
Return Value
true if the s parameter includes adjacent characters at positions index and index + 1, and the numeric value of the character at position index ranges from U+D800 through U+DBFF, and the numeric value of the character at position index+1 ranges from U+DC00 through U+DFFF; otherwise, false.Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | s is null. |
System..::..ArgumentOutOfRangeException | index is not a position within s. |