mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.5000.0 2.0.0.0 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.Runtime.InteropServices.ComVisible(true)

The .NET Framework defines a text element as a unit of text that is displayed as a single character, that is, a grapheme. A text element can be a base character, a surrogate pair, or a combining character sequence. The Unicode Standard defines a surrogate pair as a coded character representation for a single abstract character that consists of a sequence of two code units, where the first unit of the pair is a high surrogate and the second is a low surrogate. The Unicode Standard defines a combining character sequence as a combination of a base character and one or more combining characters. A surrogate pair can represent a base character or a combining character.

The class enables you to work with a string as a series of textual elements rather than individual objects. You can work with the individual text elements in a string in two ways:

By enumerating each text element. To do this, you call the method, and then repeatedly call the method on the returned object until the method returns false.

By calling the method to retrieve an array that contains the starting index of each text element. You can then retrieve individual text elements by passing these indexes to the method.

The following example illustrates both ways of working with the text elements in a string. It creates two strings:

strCombining, which is a string of Arabic characters that includes three text elements with multiple objects. The first text element is the base character ARABIC LETTER ALEF (U+-627) followed by ARABIC HAMZA BELOW (U+-655) and ARABIC KASRA (U+0650). The second text element is ARABIC LETTER HEH (U+0647) followed by ARABIC FATHA (U+-64E). The third text element is ARABIC LETTTER BEH (U+0628) followed by ARABIC DAMMATAN (U+064C).

strSurrogates, which is a string that includes three surrogate pairs: GREEK ACROPHONIC FIVE TALENTS (U+10148) from the Supplementary Multilingual Plane, U+20026 from the Supplementary Ideographic Plane, and U+F1001 from the private user area. The UTF-16 encoding of each character is a surrogate pair that consists of a high surrogate followed by a low surrogate.

Each string is parsed once by the method and then by the method. Both methods correctly parse the text elements in the two strings and display the results of the parsing operation.

code reference: System.Globalization.StringInfo.Class#1

Provides functionality to split a string into text elements and to iterate through those text elements.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  The value of the new object is initialized to the empty string ("").

  Initializes a new instance of the class.

- Constructor
  2.0.0.0
  4.0.0.0
  To be added.

  Initializes a new instance of the class to a specified string.

  A string to initialize this object.
- Method
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Boolean `` To be added.

  Indicates whether the current object is equal to a specified object.

  true if the parameter is a object and its property equals the property of this object; otherwise, false.

  An object.
- Method
  2.0.0.0
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Int32

  The behavior of is dependent on its implementation, which might change from one version of the common language runtime to another. This might happen to improve the performance of . To make the behavior of constant, the application should override the runtime implementation of with an implementation known to never change.

  Calculates a hash code for the value of the current object.

  A 32-bit signed integer hash code based on the string value of this object.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String ``

  The .NET Framework defines a text element as a unit of text that is displayed as a single character, that is, a grapheme. A text element can be a base character, a surrogate pair, or a combining character sequence. The Unicode Standard defines a surrogate pair as a coded character representation for a single abstract character that consists of a sequence of two code units, where the first unit of the pair is a high surrogate and the second is a low surrogate. The Unicode Standard defines a combining character sequence as a combination of a base character and one or more combining characters. A surrogate pair can represent a base character or a combining character.

  This method only returns the first text element. To iterate through the text elements of the string, the application should use the object generated by the method.

  Gets the first text element in a specified string.

  A string containing the first text element in the specified string.

  The string from which to get the text element.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String `` ``

  The .NET Framework defines a text element as a unit of text that is displayed as a single character, that is, a grapheme. A text element can be a base character, a surrogate pair, or a combining character sequence. The Unicode Standard defines a surrogate pair as a coded character representation for a single abstract character that consists of a sequence of two code units, where the first unit of the pair is a high surrogate and the second is a low surrogate. The Unicode Standard defines a combining character sequence as a combination of a base character and one or more combining characters. A surrogate pair can represent a base character or a combining character.

  This method only returns the first text element of the substring that starts at the specified index. To iterate through the text elements of the string, the application should use the generated by the method.

  Gets the text element at the specified index of the specified string.

  A string containing the text element at the specified index of the specified string.

  The string from which to get the text element. The zero-based index at which the text element starts.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.TextElementEnumerator ``

  The .NET Framework defines a text element as a unit of text that is displayed as a single character, that is, a grapheme. A text element can be a base character, a surrogate pair, or a combining character sequence. The Unicode Standard defines a surrogate pair as a coded character representation for a single abstract character that consists of a sequence of two code units, where the first unit of the pair is a high surrogate and the second is a low surrogate. The Unicode Standard defines a combining character sequence as a combination of a base character and one or more combining characters. A surrogate pair can represent a base character or a combining character.

  The text element enumerator is used only to read data in the string; it cannot modify the underlying string. The enumerator does not have exclusive access to the string.

  The enumerator is in an invalid state if it is positioned before the first text element in the string or after the last text element in the string. When the enumerator is in an invalid state, calling throws an exception.

  Initially, the enumerator is positioned before the first text element in the string. also brings the enumerator back to this position. Therefore, after an enumerator is created or after is called, must be called to advance the enumerator to the first text element of the string before reading the value of .

  returns the same object until either or is called.

  After the end of the string is passed, the enumerator is again in an invalid state and calling returns false. Calling throws an exception if the last call to returned false.

  Returns an enumerator that iterates through the text elements of the entire string.

  A for the entire string.

  The string to iterate through.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Globalization.TextElementEnumerator `` ``

  The .NET Framework defines a text element as a unit of text that is displayed as a single character, that is, a grapheme. A text element can be a base character, a surrogate pair, or a combining character sequence. The Unicode Standard defines a surrogate pair as a coded character representation for a single abstract character that consists of a sequence of two code units, where the first unit of the pair is a high surrogate and the second is a low surrogate. The Unicode Standard defines a combining character sequence as a combination of a base character and one or more combining characters. A surrogate pair can represent a base character or a combining character.

  The text element enumerator is used only to read data in the string; it cannot modify the underlying string. The enumerator does not have exclusive access to the string.

  The enumerator is in an invalid state if it is positioned before the first text element in the string or after the last text element in the string. When the enumerator is in an invalid state, calling throws an exception.

  Initially, the enumerator is positioned before the first text element in the string. also brings the enumerator back to this position. Therefore, after an enumerator is created or after is called, must be called to advance the enumerator to the first text element of the string before reading the value of .

  returns the same object until either or is called.

  After the end of the string is passed, the enumerator is again in an invalid state and calling returns false. Calling throws an exception if the last call to returned false.

  Returns an enumerator that iterates through the text elements of the string, starting at the specified index.

  A for the string starting at .

  The string to iterate through. The zero-based index at which to start iterating.
- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added. To be added.

  Gets the number of text elements in the current object.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32[] ``

  The Unicode Standard defines a surrogate pair as a coded character representation for a single abstract character that consists of a sequence of two code units, where the first unit of the pair is a high surrogate and the second is a low surrogate. A high surrogate is a Unicode code point in the range U+D800 through U+DBFF and a low surrogate is a Unicode code point in the range U+DC00 through U+DFFF.

  A control character is a character for which the Unicode value is U+007F or in the range U+0000 through U+001F or U+0080 through U+009F.

  The .NET Framework defines a text element as a unit of text that is displayed as a single character, that is, a grapheme. A text element can be a base character, a surrogate pair, or a combining character sequence. The Unicode Standard defines a combining character sequence as a combination of a base character and one or more combining characters. A surrogate pair can represent a base character or a combining character.

  If a combining character sequence is invalid, every combining character in that sequence is also returned.

  Each index in the resulting array is the beginning of a text element, that is, the index of the base character or the high surrogate.

  The length of each element is easily computed as the difference between successive indexes. The length of the array will always be less than or equal to the length of the string. For example, given the string "\u4f00\u302a\ud800\udc00\u4f01", this method returns the indexes 0, 2, and 4.

  ## Equivalent Members

  Starting in version 2.0 of the .NET Framework, the method and property provide an easy to use implementation of the functionality offered by the method.

  Returns the indexes of each base character, high surrogate, or control character within the specified string.

  An array of integers that contains the zero-based indexes of each base character, high surrogate, or control character within the specified string.

  The string to search.
- Property
  2.0.0.0
  4.0.0.0
  System.String To be added. To be added.

  Gets or sets the value of the current object.

- Method
  2.0.0.0
  4.0.0.0
  System.String ``

  Consider a string that consists of five text elements, indexed from 0 through 4. If the parameter is 1, the method returns a substring that consists of the text elements for which the indexes are 1, 2, 3, and 4.

  Retrieves a substring of text elements from the current object starting from a specified text element and continuing through the last text element.

  A substring of text elements in this object, starting from the text element index specified by the parameter and continuing through the last text element in this object.

  The zero-based index of a text element in this object.
- Method
  2.0.0.0
  4.0.0.0
  System.String `` ``

  Consider a string that consists of five text elements, indexed from 0 through 4. If the parameter is 1 and the parameter is 3, the method returns a substring that consists of the text elements for which the indexes are 1, 2, and 3.

  Retrieves a substring of text elements from the current object starting from a specified text element and continuing through the specified number of text elements.

  A substring of text elements in this object. The substring consists of the number of text elements specified by the parameter and starts from the text element index specified by the parameter.

  The zero-based index of a text element in this object. The number of text elements to retrieve.