C# Class imBMW.Tools.StringHelpers

Mostra file Open project: toxsedyshev/imBMW

Public Methods

Method Description
ASCIIToUTF8 ( this s ) : string
AppendToLength ( this s, uint length, char append = ' ' ) : string

Appends chars to string to reach specified length

GetChars ( this encoding, byte bytes, int offset, int length ) : char[]
GetRussianCharType ( this c ) : CharType
GetString ( this encoding ) : string
GetString ( this encoding, byte bytes, int offset, int length ) : string
IsNullOrEmpty ( string str ) : bool
IsNumeric ( this c ) : bool
IsNumeric ( this str, bool positiveOnly = true, bool integerOnly = true ) : bool
IsRussianASCIIChar ( this c ) : bool
PrependToLength ( this s, uint length, char prepend = ' ' ) : string

Prepends chars to string to reach specified length

Replace ( this s, string oldValue, string newValue ) : string

Replaces oldValue to newValue. Performance critical!

ToLower ( this c ) : char
Translit ( this s ) : string
UTF8ToASCII ( this s ) : string

Method Details

ASCIIToUTF8() public static method

public static ASCIIToUTF8 ( this s ) : string
s this
return string

AppendToLength() public static method

Appends chars to string to reach specified length
public static AppendToLength ( this s, uint length, char append = ' ' ) : string
s this String append to
length uint Required string length
append char
return string

GetChars() public static method

public static GetChars ( this encoding, byte bytes, int offset, int length ) : char[]
encoding this
bytes byte
offset int
length int
return char[]

GetRussianCharType() public static method

public static GetRussianCharType ( this c ) : CharType
c this
return CharType

GetString() public static method

public static GetString ( this encoding ) : string
encoding this
return string

GetString() public static method

public static GetString ( this encoding, byte bytes, int offset, int length ) : string
encoding this
bytes byte
offset int
length int
return string

IsNullOrEmpty() public static method

public static IsNullOrEmpty ( string str ) : bool
str string
return bool

IsNumeric() public static method

public static IsNumeric ( this c ) : bool
c this
return bool

IsNumeric() public static method

public static IsNumeric ( this str, bool positiveOnly = true, bool integerOnly = true ) : bool
str this
positiveOnly bool
integerOnly bool
return bool

IsRussianASCIIChar() public static method

public static IsRussianASCIIChar ( this c ) : bool
c this
return bool

PrependToLength() public static method

Prepends chars to string to reach specified length
public static PrependToLength ( this s, uint length, char prepend = ' ' ) : string
s this String prepend to
length uint Required string length
prepend char Char to prepend
return string

Replace() public static method

Replaces oldValue to newValue. Performance critical!
public static Replace ( this s, string oldValue, string newValue ) : string
s this Original string
oldValue string Search string
newValue string Replace string
return string

ToLower() public static method

public static ToLower ( this c ) : char
c this
return char

Translit() public static method

public static Translit ( this s ) : string
s this
return string

UTF8ToASCII() public static method

public static UTF8ToASCII ( this s ) : string
s this
return string