PostSharp6.3/API Reference/Post­Sharp.​Patterns.​Formatters Namespace/Char­Span Structure

CharSpan Structure

Represents a span of Char by encapsuling a substring or a range of a Char array.

Namespace:  PostSharp.Patterns.Formatters
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.3.11.0 (6.3.11.0)
Syntax
C#
public readonly struct CharSpan

The CharSpan type exposes the following members.

Constructors
  NameDescription
Public methodCharSpan(String)
Initializes a new CharSpan from a String, and takes the whole string.
Public methodCharSpan(Char[], Int32, Int32)
Initializes a new CharSpan from an array of Char.
Public methodCharSpan(String, Int32, Int32)
Initializes a new CharSpan from a String and specifies the start and lenght of the substring.
Properties
  NameDescription
Public propertyIsNull
Determines whether the current instance represents a null string.
Public propertyLength
Gets the number of Char in the span.
Methods
  NameDescription
Public methodStatic memberFromArraySegment
Converts a String into a CharSpan.
Public methodStatic memberFromString
Converts a String into a CharSpan.
Public methodToCharArraySegment
Converts the current CharSpan into an ArraySegment<T> of Char.
Public methodToString
Returns the fully qualified type name of this instance.
(Overrides ValueType.ToString().)
Operators
  NameDescription
Public operatorStatic memberImplicit(ArraySegment<Char> to CharSpan)
Converts an ArraySegment<T> into a CharSpan.
Public operatorStatic memberImplicit(String to CharSpan)
Converts a String into a CharSpan.
See Also