Char.IsSymbol Method (String, Int32)
Indicates whether the character at the specified position in a specified string is categorized as a symbol character.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Shared Function IsSymbol ( _ s As String, _ index As Integer _ ) As Boolean
Return ValueType: System.Boolean
true if the character at position index in s is a symbol character; otherwise, false.
Character positions in a string are indexed starting from zero.
Valid symbols are members of the following categories in System.Globalization.UnicodeCategory: MathSymbol, CurrencySymbol, ModifierSymbol, and OtherSymbol.
Symbols in the Unicode standard are a loosely defined set of characters that include the following:
Letterlike symbols, which include a set of mathematical alphanumeric symbols, as well as such symbols as ℅, №, and ™.
Number forms, such as subscripts and superscripts.
Mathematical operators and arrows.
The following example demonstrates IsSymbol.
Module Example Public Sub Demo(ByVal outputBlock As System.Windows.Controls.TextBlock) Dim str As String str = "non-symbolic characters" outputBlock.Text &= Char.IsSymbol("+"c) & vbCrLf ' Output: "True" outputBlock.Text += String.Format(Char.IsSymbol(str, 8)) & vbCrLf ' Output: "False" End Sub End Module