C# 클래스 NSlice.StringExtensions

Provides a set of static methods for System.String.
파일 보기 프로젝트 열기: nabuk/NSlice

공개 메소드들

메소드 설명
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.

메소드 상세

At() 공개 정적인 메소드

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.
리턴 char

AtOrDefault() 공개 정적인 메소드

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.
리턴 char?

Slice() 공개 정적인 메소드

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.
리턴 string

SliceDelete() 공개 정적인 메소드

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.
리턴 string