作者:VB.NET开发
项目:Syste
Module IsNumberSample
Sub Main()
Dim str As String
str = "non-numeric"
Console.WriteLine(Char.IsNumber("8"c)) ' Output: "True"
Console.WriteLine(Char.IsNumber(str, 3)) ' Output: "False"
End Sub
End Module
作者:VB.NET开发
项目:Syste
Dim utf32 As Integer = &h10107 ' AEGEAN NUMBER ONE
Dim surrogate As String = Char.ConvertFromUtf32(utf32)
For Each ch In surrogate
Console.WriteLine("U+{0:X4}: {1}", Convert.ToUInt16(ch),
Char.IsNumber(ch))
Next
作者:VB.NET开发
项目:Syste
Dim utf32 As Integer = &h10107 ' AEGEAN NUMBER ONE
Dim surrogate As String = Char.ConvertFromUtf32(utf32)
For ctr As Integer = 0 To surrogate.Length - 1
Console.WriteLine("U+{0:X4} at position {1}: {2}",
Convert.ToUInt16(surrogate(ctr)), ctr,
Char.IsNumber(surrogate, ctr))
Next