C# Класс Organic.Extensions

Показать файл Открыть проект

Открытые методы

Метод Описание
ContainsKey ( this value, string key ) : bool
GetValue ( this value, string key ) : ushort
SafeContains ( this value, char needle ) : bool
SafeIndexOf ( this value, char needle ) : int
SafeIndexOf ( this value, char needle, int startIndex ) : int
SafeIndexOfParenthesis ( this value, char needle ) : int
SafeIndexOfParenthesis ( this value, char needle, int startIndex ) : int
SafeSplit ( this value ) : string[]

Works the same as String.Split, but will not split if the requested characters are within a character or string literal.

TrimComments ( this value ) : string

Given a string, such as "SET A, B ; test", it removes all comments from that string.

TrimExcessWhitespace ( this value ) : string

Removes unneccissary whitespace from a line of code.

Unescape ( this value ) : string

Given a string with escaped characters, this will return the unescaped version. Example: "Test\\nstring" becomes "Test\nstring"

Описание методов

ContainsKey() публичный статический Метод

public static ContainsKey ( this value, string key ) : bool
value this
key string
Результат bool

GetValue() публичный статический Метод

public static GetValue ( this value, string key ) : ushort
value this
key string
Результат ushort

SafeContains() публичный статический Метод

public static SafeContains ( this value, char needle ) : bool
value this
needle char
Результат bool

SafeIndexOf() публичный статический Метод

public static SafeIndexOf ( this value, char needle ) : int
value this
needle char
Результат int

SafeIndexOf() публичный статический Метод

public static SafeIndexOf ( this value, char needle, int startIndex ) : int
value this
needle char
startIndex int
Результат int

SafeIndexOfParenthesis() публичный статический Метод

public static SafeIndexOfParenthesis ( this value, char needle ) : int
value this
needle char
Результат int

SafeIndexOfParenthesis() публичный статический Метод

public static SafeIndexOfParenthesis ( this value, char needle, int startIndex ) : int
value this
needle char
startIndex int
Результат int

SafeSplit() публичный статический Метод

Works the same as String.Split, but will not split if the requested characters are within a character or string literal.
public static SafeSplit ( this value ) : string[]
value this
Результат string[]

TrimComments() публичный статический Метод

Given a string, such as "SET A, B ; test", it removes all comments from that string.
public static TrimComments ( this value ) : string
value this
Результат string

TrimExcessWhitespace() публичный статический Метод

Removes unneccissary whitespace from a line of code.
public static TrimExcessWhitespace ( this value ) : string
value this
Результат string

Unescape() публичный статический Метод

Given a string with escaped characters, this will return the unescaped version. Example: "Test\\nstring" becomes "Test\nstring"
public static Unescape ( this value ) : string
value this
Результат string