C# Class Organic.Extensions

Afficher le fichier Open project: SirCmpwn/organic

Méthodes publiques

Méthode Description
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"

Method Details

ContainsKey() public static méthode

public static ContainsKey ( this value, string key ) : bool
value this
key string
Résultat bool

GetValue() public static méthode

public static GetValue ( this value, string key ) : ushort
value this
key string
Résultat ushort

SafeContains() public static méthode

public static SafeContains ( this value, char needle ) : bool
value this
needle char
Résultat bool

SafeIndexOf() public static méthode

public static SafeIndexOf ( this value, char needle ) : int
value this
needle char
Résultat int

SafeIndexOf() public static méthode

public static SafeIndexOf ( this value, char needle, int startIndex ) : int
value this
needle char
startIndex int
Résultat int

SafeIndexOfParenthesis() public static méthode

public static SafeIndexOfParenthesis ( this value, char needle ) : int
value this
needle char
Résultat int

SafeIndexOfParenthesis() public static méthode

public static SafeIndexOfParenthesis ( this value, char needle, int startIndex ) : int
value this
needle char
startIndex int
Résultat int

SafeSplit() public static méthode

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
Résultat string[]

TrimComments() public static méthode

Given a string, such as "SET A, B ; test", it removes all comments from that string.
public static TrimComments ( this value ) : string
value this
Résultat string

TrimExcessWhitespace() public static méthode

Removes unneccissary whitespace from a line of code.
public static TrimExcessWhitespace ( this value ) : string
value this
Résultat string

Unescape() public static méthode

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
Résultat string