class StringInfo
in global :: System . Globalization
Provides functionality to split a string into text elements and to iterate through those text elements.
public StringInfo( string value )
Initializes a new instance of the class to a specified string.
valueA string to initialize this object.
public bool Equals( object value )
Indicates whether the current object is equal to a specified object.
valueAn object.- Returns if the parameter is a object and its property equals the property of this object; otherwise, .
public static string GetNextTextElement( string str )
Gets the first text element in a specified string.
strThe string from which to get the text element.- Returns A string containing the first text element in the specified string.
public static string GetNextTextElement( string str, int index )
Gets the text element at the specified index of the specified string.
strThe string from which to get the text element.indexThe zero-based index at which the text element starts.- Returns A string containing the text element at the specified index of the specified string.
public static TextElementEnumerator GetTextElementEnumerator( string str )
Returns an enumerator that iterates through the text elements of the entire string.
strThe string to iterate through.- Returns A for the entire string.
public static TextElementEnumerator GetTextElementEnumerator( string str, int index )
Returns an enumerator that iterates through the text elements of the string, starting at the specified index.
strThe string to iterate through.indexThe zero-based index at which to start iterating.- Returns A for the string starting at .
public int LengthInTextElements { get; }
Gets the number of text elements in the current object.
- Returns The number of base characters, surrogate pairs, and combining character sequences in this object.
public static int[] ParseCombiningCharacters( string str )
Returns the indexes of each base character, high surrogate, or control character within the specified string.
strThe string to search.- Returns An array of integers that contains the zero-based indexes of each base character, high surrogate, or control character within the specified string.
public string String { get; set; }
Gets or sets the value of the current object.
- Returns The string that is the value of the current object.
public string SubstringByTextElements( int startingTextElement )
Retrieves a substring of text elements from the current object starting from a specified text element and continuing through the last text element.
startingTextElementThe zero-based index of a text element in this object.- Returns 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.
public string SubstringByTextElements( int startingTextElement, int lengthInTextElements )
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.
startingTextElementThe zero-based index of a text element in this object.lengthInTextElementsThe number of text elements to retrieve.- Returns 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.
public StringInfo( )
😔 No documentation found.
public static int GetNextTextElementLength( string str, int index )
😔 No documentation found.
public static int GetNextTextElementLength( ReadOnlySpan<char> str )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public static int GetNextTextElementLength( string str )
😔 No documentation found.