10 [__DynamicallyInvokable]
17 private int startIndex;
23 private int currTextElementLen;
25 [OptionalField(VersionAdded = 2)]
28 [OptionalField(VersionAdded = 2)]
33 private int nextTextElementLen;
38 [__DynamicallyInvokable]
41 [__DynamicallyInvokable]
51 [__DynamicallyInvokable]
54 [__DynamicallyInvokable]
57 if (index == startIndex)
61 return index - currTextElementLen;
68 this.startIndex = startIndex;
82 strLen = endIndex + 1;
83 currTextElementLen = nextTextElementLen;
86 uc = CharUnicodeInfo.InternalGetUnicodeCategory(str, index, out charLen);
93 endIndex = strLen - 1;
94 nextTextElementLen = currTextElementLen;
100 [__DynamicallyInvokable]
108 currTextElementLen =
StringInfo.GetCurrentTextElementLen(str, index, strLen, ref uc, ref charLen);
109 index += currTextElementLen;
116 [__DynamicallyInvokable]
119 if (index == startIndex)
127 return str.Substring(index - currTextElementLen, currTextElementLen);
131 [__DynamicallyInvokable]
137 uc =
CharUnicodeInfo.InternalGetUnicodeCategory(str, index, out charLen);
int ElementIndex
Gets the index of the text element that the enumerator is currently positioned over.
void Reset()
Sets the enumerator to its initial position, which is before the first text element in the string.
Describes the source and destination of a given serialized stream, and provides an additional caller-...
Provides functionality to split a string into text elements and to iterate through those text element...
Provides information about, and means to manipulate, the current environment and platform....
Enumerates the text elements of a string.
object Current
Gets the current text element in the string.
bool MoveNext()
Advances the enumerator to the next text element of the string.
string GetTextElement()
Gets the current text element in the string.
Retrieves information about a Unicode character. This class cannot be inherited.
UnicodeCategory
Defines the Unicode category of a character.
Specifies that the class can be serialized.
The exception that is thrown when a method call is invalid for the object's current state.
Supports a simple iteration over a non-generic collection.