Class MemoryExtensions
Contains extensions methods for memory types.
Inherited Members
Namespace: SixLabors.Fonts.Unicode
Assembly: SixLabors.Fonts.dll
Syntax
public static class MemoryExtensions
Methods
| Edit this page View SourceEnumerateCodePoints(ReadOnlySpan<char>)
Returns an enumeration of CodePoint from the provided span.
Declaration
public static SpanCodePointEnumerator EnumerateCodePoints(this ReadOnlySpan<char> span)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<char> | span | The readonly span of char elements representing the text to enumerate. |
Returns
Type | Description |
---|---|
SpanCodePointEnumerator |
Remarks
Invalid sequences will be represented in the enumeration by ReplacementChar.
EnumerateCodePoints(Span<char>)
Returns an enumeration of CodePoint from the provided span.
Declaration
public static SpanCodePointEnumerator EnumerateCodePoints(this Span<char> span)
Parameters
Type | Name | Description |
---|---|---|
Span<char> | span | The span of char elements representing the text to enumerate. |
Returns
Type | Description |
---|---|
SpanCodePointEnumerator |
Remarks
Invalid sequences will be represented in the enumeration by ReplacementChar.
EnumerateGraphemes(ReadOnlySpan<char>)
Returns an enumeration of Grapheme instances from the provided span.
Declaration
public static SpanGraphemeEnumerator EnumerateGraphemes(this ReadOnlySpan<char> span)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<char> | span | The readonly span of char elements representing the text to enumerate. |
Returns
Type | Description |
---|---|
SpanGraphemeEnumerator |
Remarks
Invalid sequences will be represented in the enumeration by Any.
EnumerateGraphemes(Span<char>)
Returns an enumeration of Grapheme instances from the provided span.
Declaration
public static SpanGraphemeEnumerator EnumerateGraphemes(this Span<char> span)
Parameters
Type | Name | Description |
---|---|---|
Span<char> | span | The span of char elements representing the text to enumerate. |
Returns
Type | Description |
---|---|
SpanGraphemeEnumerator |
Remarks
Invalid sequences will be represented in the enumeration by Any.
GetCodePointCount(ReadOnlySpan<char>)
Returns the number of code points in the provided span.
Declaration
public static int GetCodePointCount(this ReadOnlySpan<char> span)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<char> | span | The readonly span of char elements representing the text to enumerate. |
Returns
Type | Description |
---|---|
int | The int count. |
GetCodePointCount(Span<char>)
Returns the number of code points in the provided span.
Declaration
public static int GetCodePointCount(this Span<char> span)
Parameters
Type | Name | Description |
---|---|---|
Span<char> | span | The span of char elements representing the text to enumerate. |
Returns
Type | Description |
---|---|
int | The int count. |
GetCodePointCount(string)
Returns the number of code points in the provided text.
Declaration
public static int GetCodePointCount(this string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The text to enumerate. |
Returns
Type | Description |
---|---|
int | The int count. |
GetGraphemeCount(ReadOnlySpan<char>)
Returns the number of graphemes in the provided span.
Declaration
public static int GetGraphemeCount(this ReadOnlySpan<char> span)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<char> | span | The readonly span of char elements representing the text to enumerate. |
Returns
Type | Description |
---|---|
int | The int count. |
GetGraphemeCount(Span<char>)
Returns the number of graphemes in the provided span.
Declaration
public static int GetGraphemeCount(this Span<char> span)
Parameters
Type | Name | Description |
---|---|---|
Span<char> | span | The span of char elements representing the text to enumerate. |
Returns
Type | Description |
---|---|
int | The int count. |
GetGraphemeCount(string)
Returns the number of graphemes in the provided text.
Declaration
public static int GetGraphemeCount(this string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The text to enumerate. |
Returns
Type | Description |
---|---|
int | The int count. |