Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Globalization.​StringInfo

Assembly: System.Runtime

Inheritance: object → StringInfo

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

Properties

public int
LengthInTextElements
Gets the number of text elements in the current <see cref="T:System.Globalization.StringInfo" /> object.
public string
String
Gets or sets the value of the current <see cref="T:System.Globalization.StringInfo" /> object.

Methods

public bool
Equals​(object value)
value An object.
Returns <see langword="true" /> if the <paramref name="value" /> parameter is a <see cref="T:System.Globalization.StringInfo" /> object and its <see cref="P:System.Globalization.StringInfo.String" /> property equals the <see cref="P:System.Globalization.StringInfo.String" /> property of this <see cref="T:System.Globalization.StringInfo" /> object; otherwise, <see langword="false" /> .
Indicates whether the current <see cref="T:System.Globalization.StringInfo" /> object is equal to a specified object.
public int
GetHashCode​()
Returns A 32-bit signed integer hash code based on the string value of this <see cref="T:System.Globalization.StringInfo" /> object.
Calculates a hash code for the value of the current <see cref="T:System.Globalization.StringInfo" /> object.
public string
SubstringByTextElements​(int startingTextElement)
startingTextElement The zero-based index of a text element in this <see cref="T:System.Globalization.StringInfo" /> object.
Returns A substring of text elements in this <see cref="T:System.Globalization.StringInfo" /> object, starting from the text element index specified by the <paramref name="startingTextElement" /> parameter and continuing through the last text element in this object.
Retrieves a substring of text elements from the current <see cref="T:System.Globalization.StringInfo" /> object starting from a specified text element and continuing through the last text element.
public string
SubstringByTextElements​(int startingTextElement, int lengthInTextElements)
startingTextElement The zero-based index of a text element in this <see cref="T:System.Globalization.StringInfo" /> object.
lengthInTextElements The number of text elements to retrieve.
Returns A substring of text elements in this <see cref="T:System.Globalization.StringInfo" /> object. The substring consists of the number of text elements specified by the <paramref name="lengthInTextElements" /> parameter and starts from the text element index specified by the <paramref name="startingTextElement" /> parameter.
Retrieves a substring of text elements from the current <see cref="T:System.Globalization.StringInfo" /> object starting from a specified text element and continuing through the specified number of text elements.
protected void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .
public string
ToString​()
Inherited from object
Returns A string that represents the current object.
Returns a string that represents the current object.