Allocates a
Span<T>
and copies the characters of the string into it.
- Namespace
- Statiq
.Common - Containing Type
- StringExtensions
Syntax
public static Span<char> ToSpan(this string str)
Parameters
Name | Type | Description |
---|---|---|
str | string | The string to copy to a Span<T> . |
Return Value
Type | Description |
---|---|
Span |
A new Span<T> with the characters of the string. |