C# Класс FubuCore.StringExtensions

Показать файл Открыть проект

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

Метод Описание
AppendPath ( this path ) : string

Equivalent of FileSystem.Combine( [Union of path, parts] )

Capitalize ( this stringValue ) : string

Converts the string to Title Case

CombineToPath ( this path, string root ) : string

If the path is rooted, just returns the path. Otherwise, combines root & path

ConvertCRLFToBreaks ( this plainText ) : string

Formats a multi-line string for display on the web

DirectoryPath ( this path ) : string
EqualsIgnoreCase ( this thisString, string otherString ) : bool

Performs a case-insensitive comparison of strings

HtmlAttributeEncode ( this unEncoded ) : string
HtmlDecode ( this encoded ) : string
HtmlEncode ( this unEncoded ) : string
IfNotNull ( this target, Action continuation ) : void
IsEmpty ( this stringValue ) : bool
IsNotEmpty ( this stringValue ) : bool
IsNotEmpty ( this stringValue, Action action ) : void
IsValidNumber ( this number ) : bool
IsValidNumber ( this number, CultureInfo culture ) : bool
ParentDirectory ( this path ) : string

Retrieve the parent directory of a directory or file Shortcut to Path.GetDirectoryName(path)

PathRelativeTo ( this path, string root ) : string
ReadLines ( this text ) : IEnumerable

Reads text and returns an enumerable of strings for each line

ReadLines ( this text, Action callback ) : void

Reads text and calls back for each line of text

ToBool ( this stringValue ) : bool
ToDateTime ( this dateTimeValue ) : System.DateTime

Returns a DateTime value parsed from the dateTimeValue parameter.

ToDelimitedArray ( this content ) : string[]
ToDelimitedArray ( this content, char delimiter ) : string[]
ToFormat ( this stringFormat ) : string
ToFullPath ( this path ) : string
ToGmtFormattedDate ( this date ) : string
UrlDecode ( this encoded ) : string
UrlEncode ( this unEncoded ) : string
getPathParts ( this path ) : IList

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

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

Equivalent of FileSystem.Combine( [Union of path, parts] )
public static AppendPath ( this path ) : string
path this
Результат string

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

Converts the string to Title Case
public static Capitalize ( this stringValue ) : string
stringValue this
Результат string

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

If the path is rooted, just returns the path. Otherwise, combines root & path
public static CombineToPath ( this path, string root ) : string
path this
root string
Результат string

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

Formats a multi-line string for display on the web
public static ConvertCRLFToBreaks ( this plainText ) : string
plainText this
Результат string

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

public static DirectoryPath ( this path ) : string
path this
Результат string

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

Performs a case-insensitive comparison of strings
public static EqualsIgnoreCase ( this thisString, string otherString ) : bool
thisString this
otherString string
Результат bool

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

public static HtmlAttributeEncode ( this unEncoded ) : string
unEncoded this
Результат string

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

public static HtmlDecode ( this encoded ) : string
encoded this
Результат string

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

public static HtmlEncode ( this unEncoded ) : string
unEncoded this
Результат string

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

public static IfNotNull ( this target, Action continuation ) : void
target this
continuation Action
Результат void

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

public static IsEmpty ( this stringValue ) : bool
stringValue this
Результат bool

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

public static IsNotEmpty ( this stringValue ) : bool
stringValue this
Результат bool

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

public static IsNotEmpty ( this stringValue, Action action ) : void
stringValue this
action Action
Результат void

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

public static IsValidNumber ( this number ) : bool
number this
Результат bool

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

public static IsValidNumber ( this number, CultureInfo culture ) : bool
number this
culture System.Globalization.CultureInfo
Результат bool

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

Retrieve the parent directory of a directory or file Shortcut to Path.GetDirectoryName(path)
public static ParentDirectory ( this path ) : string
path this
Результат string

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

public static PathRelativeTo ( this path, string root ) : string
path this
root string
Результат string

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

Reads text and returns an enumerable of strings for each line
public static ReadLines ( this text ) : IEnumerable
text this
Результат IEnumerable

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

Reads text and calls back for each line of text
public static ReadLines ( this text, Action callback ) : void
text this
callback Action
Результат void

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

public static ToBool ( this stringValue ) : bool
stringValue this
Результат bool

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

Returns a DateTime value parsed from the dateTimeValue parameter.
public static ToDateTime ( this dateTimeValue ) : System.DateTime
dateTimeValue this A valid, parseable DateTime value
Результат System.DateTime

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

public static ToDelimitedArray ( this content ) : string[]
content this
Результат string[]

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

public static ToDelimitedArray ( this content, char delimiter ) : string[]
content this
delimiter char
Результат string[]

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

public static ToFormat ( this stringFormat ) : string
stringFormat this
Результат string

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

public static ToFullPath ( this path ) : string
path this
Результат string

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

public static ToGmtFormattedDate ( this date ) : string
date this
Результат string

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

public static UrlDecode ( this encoded ) : string
encoded this
Результат string

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

public static UrlEncode ( this unEncoded ) : string
unEncoded this
Результат string

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

public static getPathParts ( this path ) : IList
path this
Результат IList