C# Class UtilityExtensions.Util

Afficher le fichier Open project: bvcms/bvcms Class Usage Examples

Méthodes publiques

Méthode 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 méthode

public static AppendNewLine ( this sb, string s ) : void
sb this
s string
Résultat void

AppendNext() public static méthode

public static AppendNext ( this sb, string sep, string s ) : void
sb this
sep string
s string
Résultat void

AppendSpace() public static méthode

public static AppendSpace ( this sb, string s ) : void
sb this
s string
Résultat void

Contains() public static méthode

public static Contains ( this s, string c, bool ignoreCase ) : bool
s this
c string
ignoreCase bool
Résultat bool

Decode64() public static méthode

public static Decode64 ( this s ) : string
s this
Résultat string

DefaultTo() public static méthode

public static DefaultTo ( this s, string defaultstr ) : string
s this
defaultstr string
Résultat string

Encode64() public static méthode

public static Encode64 ( this s ) : string
s this
Résultat string

GetAttr() public static méthode

public static GetAttr ( this e, string n, string def = null ) : string
e this
n string
def string
Résultat string

GetChars() public static méthode

public static GetChars ( this s ) : string
s this
Résultat string

GetCsvToken() public static méthode

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

GetDigits() public static méthode

public static GetDigits ( this zip, int maxlen = 99 ) : string
zip this
maxlen int
Résultat string

Last() public static méthode

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

MaxString() public static méthode

public static MaxString ( this s, int length ) : string
s this
length int
Résultat string

NameSplit() public static méthode

public static NameSplit ( string name, string &first, string &last ) : void
name string
first string
last string
Résultat void

NoLeadZeros() public static méthode

public static NoLeadZeros ( this s ) : string
s this
Résultat string

RandomPassword() public static méthode

public static RandomPassword ( int length ) : string
length int
Résultat string

RemoveGrammarly() public static méthode

public static RemoveGrammarly ( this s ) : string
s this
Résultat string

Replace() public static méthode

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

SpaceCamelCase() public static méthode

public static SpaceCamelCase ( this name ) : string
name this
Résultat string

SplitLines() public static méthode

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

SplitStr() public static méthode

public static SplitStr ( this s, string delimiter ) : string[]
s this
delimiter string
Résultat string[]

SplitStr() public static méthode

public static SplitStr ( this s, string delimiter, int nitems ) : string[]
s this
delimiter string
nitems int
Résultat string[]

SplitUpperCase() public static méthode

public static SplitUpperCase ( this source ) : string[]
source this
Résultat string[]

SplitUpperCaseToString() public static méthode

public static SplitUpperCaseToString ( this source ) : string
source this
Résultat string

Truncate() public static méthode

public static Truncate ( this source, int length ) : string
source this
length int
Résultat string

URLCombine() public static méthode

public static URLCombine ( string baseUrl, string relativeUrl ) : string
baseUrl string
relativeUrl string
Résultat string

trim() public static méthode

public static trim ( this source ) : string
source this
Résultat string