TextElementEnumerator Class enumerates the text elements of a string.
Imports System
Imports System.Globalization
Imports Microsoft.VisualBasic
Public Class SamplesTextElementEnumerator
Public Shared Sub Main()
Dim myString As String = ChrW(&HD800) & ChrW(&HDC00) & ChrW(&H0061) & ChrW(&H0300) & ChrW(&H00C6)
Dim myTEE As TextElementEnumerator = StringInfo.GetTextElementEnumerator( myString )
myTEE.Reset()
While myTEE.MoveNext()
Console.WriteLine("[{0}]:{1} {2}", myTEE.ElementIndex, myTEE.Current, myTEE.GetTextElement())
End While
End Sub
End Class
Related examples in the same category