C# Class sass.Extensions

Show file Open project: KnightOS/sass

Public Methods

Method Description
RemoveExcessWhitespace ( this value ) : string

Reduces all consecutive spaces and tabs to one space.

Replace ( this str, string oldValue, string newValue, System.StringComparison comparison ) : string
SafeContains ( this value, char needle ) : bool

Checks for value contained within a string, outside of '' and ""

SafeContains ( this value, string needle ) : bool

Checks for value contained within a string, outside of '' and ""

SafeIndexOf ( this value, char needle ) : int
SafeIndexOf ( this value, char needle, int index ) : int
SafeIndexOf ( this value, string needle ) : 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

Trims comments from the end of a line. Uses ';' as the comment delimiter.

Unescape ( this value ) : string

Method Details

RemoveExcessWhitespace() public static method

Reduces all consecutive spaces and tabs to one space.
public static RemoveExcessWhitespace ( this value ) : string
value this
return string

Replace() public static method

public static Replace ( this str, string oldValue, string newValue, System.StringComparison comparison ) : string
str this
oldValue string
newValue string
comparison System.StringComparison
return string

SafeContains() public static method

Checks for value contained within a string, outside of '' and ""
public static SafeContains ( this value, char needle ) : bool
value this
needle char
return bool

SafeContains() public static method

Checks for value contained within a string, outside of '' and ""
public static SafeContains ( this value, string needle ) : bool
value this
needle string
return bool

SafeIndexOf() public static method

public static SafeIndexOf ( this value, char needle ) : int
value this
needle char
return int

SafeIndexOf() public static method

public static SafeIndexOf ( this value, char needle, int index ) : int
value this
needle char
index int
return int

SafeIndexOf() public static method

public static SafeIndexOf ( this value, string needle ) : int
value this
needle string
return int

SafeSplit() public static method

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
return string[]

TrimComments() public static method

Trims comments from the end of a line. Uses ';' as the comment delimiter.
public static TrimComments ( this value ) : string
value this
return string

Unescape() public static method

public static Unescape ( this value ) : string
value this
return string