C# Class Fanx.Util.StrUtil

StrUtil provides helpful methods for string manipulation.
Afficher le fichier Open project: xored/f4

Méthodes publiques

Méthode Description
Replace ( string s, string match, string replace ) : string
asCode ( string s ) : string

Translate the specified string as it would appear in code as a string literal. For example all newlines appear as \n.

flagsToString ( int flags ) : string
getSpaces ( int len ) : string

Get a string containing the specified number of spaces.

padl ( string s, int len ) : string

Pad to the left to ensure string is specified length. If s.length already greater than len, do nothing.

padr ( string s, int len ) : string

Pad to the right to ensure string is specified length. If s.length already greater than len, do nothing.

toOrder ( int index ) : string

Return a zero based index as "first", "second", etc.

Private Methods

Méthode Description
StrUtil ( ) : System

Method Details

Replace() public static méthode

public static Replace ( string s, string match, string replace ) : string
s string
match string
replace string
Résultat string

asCode() public static méthode

Translate the specified string as it would appear in code as a string literal. For example all newlines appear as \n.
public static asCode ( string s ) : string
s string
Résultat string

flagsToString() public static méthode

public static flagsToString ( int flags ) : string
flags int
Résultat string

getSpaces() public static méthode

Get a string containing the specified number of spaces.
public static getSpaces ( int len ) : string
len int
Résultat string

padl() public static méthode

Pad to the left to ensure string is specified length. If s.length already greater than len, do nothing.
public static padl ( string s, int len ) : string
s string
len int
Résultat string

padr() public static méthode

Pad to the right to ensure string is specified length. If s.length already greater than len, do nothing.
public static padr ( string s, int len ) : string
s string
len int
Résultat string

toOrder() public static méthode

Return a zero based index as "first", "second", etc.
public static toOrder ( int index ) : string
index int
Résultat string