C# Class NSlice.StringExtensions

Provides a set of static methods for System.String.
Afficher le fichier Open project: nabuk/NSlice

Méthodes publiques

Méthode Description
At ( this source, int index ) : char

Returns the character at a specified index in a string. Index can be negative, e.g. '-1' means last, '-2' means one before last and so on.

AtOrDefault ( this source, int index ) : char?

Returns the character at a specified index in a string or null if the index is out of range. Index can be negative, e.g. '-1' means last, '-2' means one before last and so on.

Slice ( this source, int from = null, int to = null, int step = 1 ) : string

Performs slice on passed string.

SliceDelete ( this source, int from = null, int to = null, int step = 1 ) : string

Performs deletion of specified slice.

Method Details

At() public static méthode

Returns the character at a specified index in a string. Index can be negative, e.g. '-1' means last, '-2' means one before last and so on.
source is null. index is out of source string's range.
public static At ( this source, int index ) : char
source this Source string.
index int Index of character to retrieve.
Résultat char

AtOrDefault() public static méthode

Returns the character at a specified index in a string or null if the index is out of range. Index can be negative, e.g. '-1' means last, '-2' means one before last and so on.
source is null.
public static AtOrDefault ( this source, int index ) : char?
source this Source string.
index int Index of character to retrieve.
Résultat char?

Slice() public static méthode

Performs slice on passed string.
source is null. step is equal to 0.
public static Slice ( this source, int from = null, int to = null, int step = 1 ) : string
source this Source string.
from int First character index.
to int Exclusive boundary.
step int Increment index by.
Résultat string

SliceDelete() public static méthode

Performs deletion of specified slice.
source is null. step is equal to 0.
public static SliceDelete ( this source, int from = null, int to = null, int step = 1 ) : string
source this Source string.
from int First character index to delete.
to int Exclusive boundary.
step int Increment index by.
Résultat string