Description |
The GetTextElementEnumerator method returns a TextElementEnumerator object that provides a controlled mechanism for processing the text elements in the given TextString.
Optionally, the string may be parsed from the given StartIndex.
|
| Notes | Very Important : Methods in .Net treat strings as starting at 0, unlike traditional Delphi where they started at 1.
|
|
Microsoft MSDN Links |
System.Globalization
System.Globalization.StringInfo
|
|
|
A simple example |
program Project1;
{$APPTYPE CONSOLE}
uses
System.Globalization;
var
enumerator : System.Globalization.TextElementEnumerator;
myString : String;
myText : String;
begin
myString := 'Hello';
enumerator := StringInfo.GetTextElementEnumerator(myString);
while enumerator.MoveNext do
begin
myText := String(enumerator.Current);
Console.WriteLine(myText);
end;
Console.ReadLine;
end.
| Show full unit code | H
e
l
l
o
|
|
|
|