StringInfo.GetNextTextElementLength 方法

定義

多載

GetNextTextElementLength(ReadOnlySpan<Char>)

傳回在輸入範圍中發生之第一個文字元素 (擴充 grapheme 叢集) 的長度。

GetNextTextElementLength(String)

傳回 (在輸入字串中發生之擴充 grapheme 叢集的第一個文字元素長度) 。

GetNextTextElementLength(String, Int32)

傳回第一個文字元素的長度, (擴充的 grapheme 叢集) ,從指定的索引開始的輸入字串中發生。

GetNextTextElementLength(ReadOnlySpan<Char>)

來源:
StringInfo.cs
來源:
StringInfo.cs
來源:
StringInfo.cs

傳回在輸入範圍中發生之第一個文字元素 (擴充 grapheme 叢集) 的長度。

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

參數

str
ReadOnlySpan<Char>

要分析的輸入範圍。

傳回

字元中的長度 () 對應至 內 str第一個文字元素的子字串,如果是空的,則為 str 0。

備註

grapheme 叢集是一連串的一或多個 Unicode 字碼點,應該視為單一單位。

適用於

GetNextTextElementLength(String)

來源:
StringInfo.cs
來源:
StringInfo.cs
來源:
StringInfo.cs

傳回 (在輸入字串中發生之擴充 grapheme 叢集的第一個文字元素長度) 。

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

參數

str
String

要分析的輸入字串。

傳回

字元中的長度 () 對應至 內 str第一個文字元素的子字串,如果是空的,則為 str 0。

例外狀況

strnull

備註

grapheme 叢集是一連串的一或多個 Unicode 字碼點,應該視為單一單位。

適用於

GetNextTextElementLength(String, Int32)

來源:
StringInfo.cs
來源:
StringInfo.cs
來源:
StringInfo.cs

傳回第一個文字元素的長度, (擴充的 grapheme 叢集) ,從指定的索引開始的輸入字串中發生。

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

參數

str
String

要分析的輸入字串。

index
Int32

要開始分析的字元位移 str

傳回

字元中的長度 (,) 對應至索引 開頭的第str一個文字元素的子字串,如果 對應至 的str結尾,則為 indexindex0。

例外狀況

strnull

index為負數或超過 結尾。str

備註

grapheme 叢集是一連串的一或多個 Unicode 字碼點,應該視為單一單位。

適用於