C# Класс Fanx.Util.StrUtil

StrUtil provides helpful methods for string manipulation.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
StrUtil ( ) : System

Описание методов

Replace() публичный статический Метод

public static Replace ( string s, string match, string replace ) : string
s string
match string
replace string
Результат string

asCode() публичный статический Метод

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
Результат string

flagsToString() публичный статический Метод

public static flagsToString ( int flags ) : string
flags int
Результат string

getSpaces() публичный статический Метод

Get a string containing the specified number of spaces.
public static getSpaces ( int len ) : string
len int
Результат string

padl() публичный статический Метод

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
Результат string

padr() публичный статический Метод

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
Результат string

toOrder() публичный статический Метод

Return a zero based index as "first", "second", etc.
public static toOrder ( int index ) : string
index int
Результат string