Char: IsSurrogateStr

IsSurrogateStr

Indicates whether the character at the specified position in a specified string has a surrogate code unit.



 Public Function IsSurrogateStr(
	  ByRef s As String,
	  ByVal Index As Long ) As Boolean

Parameters

s
[ByRef] String. A string.
Index
[ByVal] Long. The position of the character to evaluate in s.

Return Values

Boolean -  True if c is either a high surrogate or a low surrogate; otherwise, False.

Remarks

The Index parameter is zero-based where as VisualBasic is one-based.

A surrogate is a Char object with a UTF-16 code unit in the range from U+D800 to U+DFFF. The individual surrogate code unit has no interpretation of its own, but has meaning only when used as part of a surrogate pair.

For more information about surrogate pairs, see the Unicode Standard at the OnlineUnicode home page.

Exceptions

ExceptionCondition
ArgumentOutOfRangeException Index is not a position within s.

See Also

Project CorLib Overview

Class Char Overview

IsSurrogate

IsHighSurrogate

IsHighSurrogateStr

IsLowSurrogate

IsLowSurrogateStr