Namespace: PostSharp.Patterns.Formatters
Assembly: PostSharp.Patterns.Common.dll
Syntax
public readonly struct CharSpan
Constructors
Name | Description |
---|---|
CharSpan(char[], int, int) | |
CharSpan(string) | Initializes a new CharSpan from a string, and takes the whole string. |
CharSpan(string, int, int) | Initializes a new CharSpan from a string and specifies the start and lenght of the substring. |
Properties
Name | Description |
---|---|
IsBackedByCharArray | Determines whether the current CharSpan is backed by a |
IsNull | Determines whether the current instance represents a null string. |
Length | Gets the number of char in the span. |
Methods
Name | Description |
---|---|
FromArraySegment(ArraySegment<char>) | |
FromString(string) | |
ToCharArraySegment() | Converts the current CharSpan into an ArraySegment<T> of char.
When the IsBackedByCharArray or IsNull property is |
ToString() |
Operators
Name | Description |
---|---|
implicit operator CharSpan(ArraySegment<char>) | Converts an ArraySegment<T> into a CharSpan. |
implicit operator CharSpan(string) |