StringInfo.GetNextTextElementLength 方法

定义

重载

名称 说明
GetNextTextElementLength(ReadOnlySpan<Char>)

返回输入范围中发生的第一个文本元素(扩展图形群集)的长度。

GetNextTextElementLength(String)

返回输入字符串中发生的第一个文本元素(扩展 grapheme 群集)的长度。

GetNextTextElementLength(String, Int32)

返回从指定索引开始的输入字符串中发生的第一个文本元素(扩展图形群集)的长度。

GetNextTextElementLength(ReadOnlySpan<Char>)

Source:
StringInfo.cs
Source:
StringInfo.cs
Source:
StringInfo.cs
Source:
StringInfo.cs
Source:
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。

注解

grapheme 群集是一个或多个应被视为单个单元的 Unicode 码点序列。

适用于

GetNextTextElementLength(String)

Source:
StringInfo.cs
Source:
StringInfo.cs
Source:
StringInfo.cs
Source:
StringInfo.cs
Source:
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)

Source:
StringInfo.cs
Source:
StringInfo.cs
Source:
StringInfo.cs
Source:
StringInfo.cs
Source:
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

返回

与索引index开头str的第一个文本元素对应的子字符串的长度(以字符为单位),如果对应于索引的str末尾,则为 index 0。

例外

strnull

index为负数或超出结尾。str

注解

grapheme 群集是一个或多个应被视为单个单元的 Unicode 码点序列。

适用于