Open sandboxFocus

Constructor CharSpan

CharSpan(char[], int, int)

Initializes a new CharSpan from an array of char.

Declaration
public CharSpan(char[] array, int start, int length)
Parameters
Type Name Description
char[] array

An array of char.

int start

The start index of the span in the array.

int length

The number of characters in the span.

CharSpan(string, int, int)

Initializes a new CharSpan from a string and specifies the start and lenght of the substring.

Declaration
public CharSpan(string str, int start, int length)
Parameters
Type Name Description
string str

A string.

int start

The index of the first character of the span in str.

int length

The number of characters in the span.

CharSpan(string)

Initializes a new CharSpan from a string, and takes the whole string.

Declaration
public CharSpan(string str)
Parameters
Type Name Description
string str

A string.