Bewerken

Delen via


StringInfo.GetNextTextElementLength Method

Definition

Overloads

GetNextTextElementLength(ReadOnlySpan<Char>)

Returns the length of the first text element (extended grapheme cluster) that occurs in the input span.

GetNextTextElementLength(String)

Returns the length of the first text element (extended grapheme cluster) that occurs in the input string.

GetNextTextElementLength(String, Int32)

Returns the length of the first text element (extended grapheme cluster) that occurs in the input string starting at the specified index.

GetNextTextElementLength(ReadOnlySpan<Char>)

Source:
StringInfo.cs
Source:
StringInfo.cs
Source:
StringInfo.cs

Returns the length of the first text element (extended grapheme cluster) that occurs in the input span.

public:
 static int GetNextTextElementLength(ReadOnlySpan<char> str);
public static int GetNextTextElementLength (ReadOnlySpan<char> str);
static member GetNextTextElementLength : ReadOnlySpan<char> -> int
Public Shared Function GetNextTextElementLength (str As ReadOnlySpan(Of Char)) As Integer

Parameters

str
ReadOnlySpan<Char>

The input span to analyze.

Returns

The length (in chars) of the substring corresponding to the first text element within str, or 0 if str is empty.

Remarks

A grapheme cluster is a sequence of one or more Unicode code points that should be treated as a single unit.

Applies to

GetNextTextElementLength(String)

Source:
StringInfo.cs
Source:
StringInfo.cs
Source:
StringInfo.cs

Returns the length of the first text element (extended grapheme cluster) that occurs in the input string.

public:
 static int GetNextTextElementLength(System::String ^ str);
public static int GetNextTextElementLength (string str);
static member GetNextTextElementLength : string -> int
Public Shared Function GetNextTextElementLength (str As String) As Integer

Parameters

str
String

The input string to analyze.

Returns

The length (in chars) of the substring corresponding to the first text element within str, or 0 if str is empty.

Exceptions

str is null.

Remarks

A grapheme cluster is a sequence of one or more Unicode code points that should be treated as a single unit.

Applies to

GetNextTextElementLength(String, Int32)

Source:
StringInfo.cs
Source:
StringInfo.cs
Source:
StringInfo.cs

Returns the length of the first text element (extended grapheme cluster) that occurs in the input string starting at the specified index.

public:
 static int GetNextTextElementLength(System::String ^ str, int index);
public static int GetNextTextElementLength (string str, int index);
static member GetNextTextElementLength : string * int -> int
Public Shared Function GetNextTextElementLength (str As String, index As Integer) As Integer

Parameters

str
String

The input string to analyze.

index
Int32

The char offset in str at which to begin analysis.

Returns

The length (in chars) of the substring corresponding to the first text element within str starting at index index, or 0 if index corresponds to the end of str.

Exceptions

str is null.

index is negative or beyond the end of str.

Remarks

A grapheme cluster is a sequence of one or more Unicode code points that should be treated as a single unit.

Applies to