C# Class UtilityExtensions.Util

Datei anzeigen Open project: bvcms/bvcms Class Usage Examples

Public Methods

Method Description
AppendNewLine ( this sb, string s ) : void
AppendNext ( this sb, string sep, string s ) : void
AppendSpace ( this sb, string s ) : void
Contains ( this s, string c, bool ignoreCase ) : bool
Decode64 ( this s ) : string
DefaultTo ( this s, string defaultstr ) : string
Encode64 ( this s ) : string
GetAttr ( this e, string n, string def = null ) : string
GetChars ( this s ) : string
GetCsvToken ( this s, int n = 1, int ntokens = 1000, string sep = "," ) : string
GetDigits ( this zip, int maxlen = 99 ) : string
Last ( this source, int stringLength ) : string

Given a source string, return the last stringLength characters from the string.

MaxString ( this s, int length ) : string
NameSplit ( string name, string &first, string &last ) : void
NoLeadZeros ( this s ) : string
RandomPassword ( int length ) : string
RemoveGrammarly ( this s ) : string
Replace ( this str, string oldValue, string newValue, bool ignoreCase = false ) : string
SpaceCamelCase ( this name ) : string
SplitLines ( this source, bool noblanks = false ) : string[]
SplitStr ( this s, string delimiter ) : string[]
SplitStr ( this s, string delimiter, int nitems ) : string[]
SplitUpperCase ( this source ) : string[]
SplitUpperCaseToString ( this source ) : string
Truncate ( this source, int length ) : string
URLCombine ( string baseUrl, string relativeUrl ) : string
trim ( this source ) : string

Method Details

AppendNewLine() public static method

public static AppendNewLine ( this sb, string s ) : void
sb this
s string
return void

AppendNext() public static method

public static AppendNext ( this sb, string sep, string s ) : void
sb this
sep string
s string
return void

AppendSpace() public static method

public static AppendSpace ( this sb, string s ) : void
sb this
s string
return void

Contains() public static method

public static Contains ( this s, string c, bool ignoreCase ) : bool
s this
c string
ignoreCase bool
return bool

Decode64() public static method

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

DefaultTo() public static method

public static DefaultTo ( this s, string defaultstr ) : string
s this
defaultstr string
return string

Encode64() public static method

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

GetAttr() public static method

public static GetAttr ( this e, string n, string def = null ) : string
e this
n string
def string
return string

GetChars() public static method

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

GetCsvToken() public static method

public static GetCsvToken ( this s, int n = 1, int ntokens = 1000, string sep = "," ) : string
s this
n int
ntokens int
sep string
return string

GetDigits() public static method

public static GetDigits ( this zip, int maxlen = 99 ) : string
zip this
maxlen int
return string

Last() public static method

Given a source string, return the last stringLength characters from the string.
public static Last ( this source, int stringLength ) : string
source this
stringLength int
return string

MaxString() public static method

public static MaxString ( this s, int length ) : string
s this
length int
return string

NameSplit() public static method

public static NameSplit ( string name, string &first, string &last ) : void
name string
first string
last string
return void

NoLeadZeros() public static method

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

RandomPassword() public static method

public static RandomPassword ( int length ) : string
length int
return string

RemoveGrammarly() public static method

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

Replace() public static method

public static Replace ( this str, string oldValue, string newValue, bool ignoreCase = false ) : string
str this
oldValue string
newValue string
ignoreCase bool
return string

SpaceCamelCase() public static method

public static SpaceCamelCase ( this name ) : string
name this
return string

SplitLines() public static method

public static SplitLines ( this source, bool noblanks = false ) : string[]
source this
noblanks bool
return string[]

SplitStr() public static method

public static SplitStr ( this s, string delimiter ) : string[]
s this
delimiter string
return string[]

SplitStr() public static method

public static SplitStr ( this s, string delimiter, int nitems ) : string[]
s this
delimiter string
nitems int
return string[]

SplitUpperCase() public static method

public static SplitUpperCase ( this source ) : string[]
source this
return string[]

SplitUpperCaseToString() public static method

public static SplitUpperCaseToString ( this source ) : string
source this
return string

Truncate() public static method

public static Truncate ( this source, int length ) : string
source this
length int
return string

URLCombine() public static method

public static URLCombine ( string baseUrl, string relativeUrl ) : string
baseUrl string
relativeUrl string
return string

trim() public static method

public static trim ( this source ) : string
source this
return string