Provides functionality to split a string into text elements and to iterate through those text elements.
More...
|
| StringInfo () |
| Initializes a new instance of the T:System.Globalization.StringInfo class. More...
|
|
| StringInfo (string value) |
| Initializes a new instance of the T:System.Globalization.StringInfo class to a specified string. More...
|
|
override bool | Equals (object value) |
| Indicates whether the current T:System.Globalization.StringInfo object is equal to a specified object. More...
|
|
override int | GetHashCode () |
| Calculates a hash code for the value of the current T:System.Globalization.StringInfo object. More...
|
|
string | SubstringByTextElements (int startingTextElement) |
| Retrieves a substring of text elements from the current T:System.Globalization.StringInfo object starting from a specified text element and continuing through the last text element. More...
|
|
string | SubstringByTextElements (int startingTextElement, int lengthInTextElements) |
| Retrieves a substring of text elements from the current T:System.Globalization.StringInfo object starting from a specified text element and continuing through the specified number of text elements. More...
|
|
|
string | String [get, set] |
| Gets or sets the value of the current T:System.Globalization.StringInfo object. More...
|
|
int | LengthInTextElements [get] |
| Gets the number of text elements in the current T:System.Globalization.StringInfo object. More...
|
|
Provides functionality to split a string into text elements and to iterate through those text elements.
Definition at line 10 of file StringInfo.cs.
◆ StringInfo() [1/2]
System.Globalization.StringInfo.StringInfo |
( |
| ) |
|
Initializes a new instance of the T:System.Globalization.StringInfo class.
Definition at line 71 of file StringInfo.cs.
◆ StringInfo() [2/2]
System.Globalization.StringInfo.StringInfo |
( |
string |
value | ) |
|
Initializes a new instance of the T:System.Globalization.StringInfo class to a specified string.
- Parameters
-
value | A string to initialize this T:System.Globalization.StringInfo object. |
- Exceptions
-
T:System.ArgumentNullException | value is null . |
Definition at line 81 of file StringInfo.cs.
◆ Equals()
override bool System.Globalization.StringInfo.Equals |
( |
object |
value | ) |
|
Indicates whether the current T:System.Globalization.StringInfo object is equal to a specified object.
- Parameters
-
- Returns
true
if the value parameter is a T:System.Globalization.StringInfo object and its P:System.Globalization.StringInfo.String property equals the P:System.Globalization.StringInfo.String property of this T:System.Globalization.StringInfo object; otherwise, false
.
Definition at line 107 of file StringInfo.cs.
◆ GetHashCode()
override int System.Globalization.StringInfo.GetHashCode |
( |
| ) |
|
Calculates a hash code for the value of the current T:System.Globalization.StringInfo object.
- Returns
- A 32-bit signed integer hash code based on the string value of this T:System.Globalization.StringInfo object.
Definition at line 121 of file StringInfo.cs.
◆ GetNextTextElement() [1/2]
static string System.Globalization.StringInfo.GetNextTextElement |
( |
string |
str | ) |
|
|
static |
Gets the first text element in a specified string.
- Parameters
-
str | The string from which to get the text element. |
- Returns
- A string containing the first text element in the specified string.
- Exceptions
-
T:System.ArgumentNullException | str is null . |
Definition at line 185 of file StringInfo.cs.
◆ GetNextTextElement() [2/2]
static string System.Globalization.StringInfo.GetNextTextElement |
( |
string |
str, |
|
|
int |
index |
|
) |
| |
|
static |
Gets the text element at the specified index of the specified string.
- Parameters
-
str | The string from which to get the text element. |
index | The zero-based index at which the text element starts. |
- Returns
- A string containing the text element at the specified index of the specified string.
- Exceptions
-
T:System.ArgumentNullException | str is null . |
T:System.ArgumentOutOfRangeException | index is outside the range of valid indexes for str . |
Definition at line 227 of file StringInfo.cs.
◆ GetTextElementEnumerator() [1/2]
Returns an enumerator that iterates through the text elements of the entire string.
- Parameters
-
str | The string to iterate through. |
- Returns
- A T:System.Globalization.TextElementEnumerator for the entire string.
- Exceptions
-
T:System.ArgumentNullException | str is null . |
Definition at line 253 of file StringInfo.cs.
◆ GetTextElementEnumerator() [2/2]
static TextElementEnumerator System.Globalization.StringInfo.GetTextElementEnumerator |
( |
string |
str, |
|
|
int |
index |
|
) |
| |
|
static |
Returns an enumerator that iterates through the text elements of the string, starting at the specified index.
- Parameters
-
str | The string to iterate through. |
index | The zero-based index at which to start iterating. |
- Returns
- A T:System.Globalization.TextElementEnumerator for the string starting at index .
- Exceptions
-
T:System.ArgumentNullException | str is null . |
T:System.ArgumentOutOfRangeException | index is outside the range of valid indexes for str . |
Definition at line 267 of file StringInfo.cs.
◆ ParseCombiningCharacters()
static int [] System.Globalization.StringInfo.ParseCombiningCharacters |
( |
string |
str | ) |
|
|
static |
Returns the indexes of each base character, high surrogate, or control character within the specified string.
- Parameters
-
- Returns
- An array of integers that contains the zero-based indexes of each base character, high surrogate, or control character within the specified string.
- Exceptions
-
T:System.ArgumentNullException | str is null . |
Definition at line 287 of file StringInfo.cs.
◆ SubstringByTextElements() [1/2]
string System.Globalization.StringInfo.SubstringByTextElements |
( |
int |
startingTextElement | ) |
|
Retrieves a substring of text elements from the current T:System.Globalization.StringInfo object starting from a specified text element and continuing through the last text element.
- Parameters
-
startingTextElement | The zero-based index of a text element in this T:System.Globalization.StringInfo object. |
- Returns
- A substring of text elements in this T:System.Globalization.StringInfo object, starting from the text element index specified by the startingTextElement parameter and continuing through the last text element in this object.
- Exceptions
-
T:System.ArgumentOutOfRangeException | startingTextElement is less than zero.-or-The string that is the value of the current T:System.Globalization.StringInfo object is the empty string (""). |
Definition at line 131 of file StringInfo.cs.
◆ SubstringByTextElements() [2/2]
string System.Globalization.StringInfo.SubstringByTextElements |
( |
int |
startingTextElement, |
|
|
int |
lengthInTextElements |
|
) |
| |
Retrieves a substring of text elements from the current T:System.Globalization.StringInfo object starting from a specified text element and continuing through the specified number of text elements.
- Parameters
-
startingTextElement | The zero-based index of a text element in this T:System.Globalization.StringInfo object. |
lengthInTextElements | The number of text elements to retrieve. |
- Returns
- A substring of text elements in this T:System.Globalization.StringInfo object. The substring consists of the number of text elements specified by the lengthInTextElements parameter and starts from the text element index specified by the startingTextElement parameter.
- Exceptions
-
T:System.ArgumentOutOfRangeException | startingTextElement is less than zero.-or- startingTextElement is greater than or equal to the length of the string that is the value of the current T:System.Globalization.StringInfo object.-or- lengthInTextElements is less than zero.-or-The string that is the value of the current T:System.Globalization.StringInfo object is the empty string ("").-or- startingTextElement + lengthInTextElements specify an index that is greater than the number of text elements in this T:System.Globalization.StringInfo object. |
Definition at line 153 of file StringInfo.cs.
◆ LengthInTextElements
int System.Globalization.StringInfo.LengthInTextElements |
|
get |
Gets the number of text elements in the current T:System.Globalization.StringInfo object.
- Returns
- The number of base characters, surrogate pairs, and combining character sequences in this T:System.Globalization.StringInfo object.
Definition at line 57 of file StringInfo.cs.
◆ String
string System.Globalization.StringInfo.String |
|
getset |
Gets or sets the value of the current T:System.Globalization.StringInfo object.
- Returns
- The string that is the value of the current T:System.Globalization.StringInfo object.
- Exceptions
-
T:System.ArgumentNullException | The value in a set operation is null . |
Definition at line 35 of file StringInfo.cs.
The documentation for this class was generated from the following file: