語言

StringInfo.GetNextTextElementLength 方法

定義

多載

名稱 Description
GetNextTextElementLength(ReadOnlySpan<Char>)

回傳輸入區間中第一個文字元素(擴展字素叢集)的長度。

GetNextTextElementLength(String)

回傳輸入字串中第一個文字元素(擴展字素叢集)的長度。

GetNextTextElementLength(String, Int32)

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

GetNextTextElementLength(ReadOnlySpan<Char>)

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

回傳輸入區間中第一個文字元素(擴展字素叢集)的長度。

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。

備註

字素叢集是一串由一個或多個 Unicode 代碼點組成的序列,應視為單一單元。

適用於

GetNextTextElementLength(String)

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

回傳輸入字串中第一個文字元素(擴展字素叢集)的長度。

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。

例外狀況

str 是 null。

備註

字素叢集是一串由一個或多個 Unicode 代碼點組成的序列,應視為單一單元。

適用於

GetNextTextElementLength(String, Int32)

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

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

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 。

傳回

對應於索引 中第一個文字元素strindex的子字串長度(字元數),若對應於 的結尾str,則index為 0。

例外狀況

str 是 null。

index 是負值或超過的 str終點。

備註

字素叢集是一串由一個或多個 Unicode 代碼點組成的序列,應視為單一單元。

適用於