C# Class FubuCore.StringExtensions

Afficher le fichier Open project: jmarnold/fubumvc-testrunner

Méthodes publiques

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

Method Details

AppendPath() public static méthode

Equivalent of FileSystem.Combine( [Union of path, parts] )
public static AppendPath ( this path ) : string
path this
Résultat string

Capitalize() public static méthode

Converts the string to Title Case
public static Capitalize ( this stringValue ) : string
stringValue this
Résultat string

CombineToPath() public static méthode

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
Résultat string

ConvertCRLFToBreaks() public static méthode

Formats a multi-line string for display on the web
public static ConvertCRLFToBreaks ( this plainText ) : string
plainText this
Résultat string

DirectoryPath() public static méthode

public static DirectoryPath ( this path ) : string
path this
Résultat string

EqualsIgnoreCase() public static méthode

Performs a case-insensitive comparison of strings
public static EqualsIgnoreCase ( this thisString, string otherString ) : bool
thisString this
otherString string
Résultat bool

HtmlAttributeEncode() public static méthode

public static HtmlAttributeEncode ( this unEncoded ) : string
unEncoded this
Résultat string

HtmlDecode() public static méthode

public static HtmlDecode ( this encoded ) : string
encoded this
Résultat string

HtmlEncode() public static méthode

public static HtmlEncode ( this unEncoded ) : string
unEncoded this
Résultat string

IfNotNull() public static méthode

public static IfNotNull ( this target, Action continuation ) : void
target this
continuation Action
Résultat void

IsEmpty() public static méthode

public static IsEmpty ( this stringValue ) : bool
stringValue this
Résultat bool

IsNotEmpty() public static méthode

public static IsNotEmpty ( this stringValue ) : bool
stringValue this
Résultat bool

IsNotEmpty() public static méthode

public static IsNotEmpty ( this stringValue, Action action ) : void
stringValue this
action Action
Résultat void

IsValidNumber() public static méthode

public static IsValidNumber ( this number ) : bool
number this
Résultat bool

IsValidNumber() public static méthode

public static IsValidNumber ( this number, CultureInfo culture ) : bool
number this
culture System.Globalization.CultureInfo
Résultat bool

ParentDirectory() public static méthode

Retrieve the parent directory of a directory or file Shortcut to Path.GetDirectoryName(path)
public static ParentDirectory ( this path ) : string
path this
Résultat string

PathRelativeTo() public static méthode

public static PathRelativeTo ( this path, string root ) : string
path this
root string
Résultat string

ReadLines() public static méthode

Reads text and returns an enumerable of strings for each line
public static ReadLines ( this text ) : IEnumerable
text this
Résultat IEnumerable

ReadLines() public static méthode

Reads text and calls back for each line of text
public static ReadLines ( this text, Action callback ) : void
text this
callback Action
Résultat void

ToBool() public static méthode

public static ToBool ( this stringValue ) : bool
stringValue this
Résultat bool

ToDateTime() public static méthode

Returns a DateTime value parsed from the dateTimeValue parameter.
public static ToDateTime ( this dateTimeValue ) : System.DateTime
dateTimeValue this A valid, parseable DateTime value
Résultat System.DateTime

ToDelimitedArray() public static méthode

public static ToDelimitedArray ( this content ) : string[]
content this
Résultat string[]

ToDelimitedArray() public static méthode

public static ToDelimitedArray ( this content, char delimiter ) : string[]
content this
delimiter char
Résultat string[]

ToFormat() public static méthode

public static ToFormat ( this stringFormat ) : string
stringFormat this
Résultat string

ToFullPath() public static méthode

public static ToFullPath ( this path ) : string
path this
Résultat string

ToGmtFormattedDate() public static méthode

public static ToGmtFormattedDate ( this date ) : string
date this
Résultat string

UrlDecode() public static méthode

public static UrlDecode ( this encoded ) : string
encoded this
Résultat string

UrlEncode() public static méthode

public static UrlEncode ( this unEncoded ) : string
unEncoded this
Résultat string

getPathParts() public static méthode

public static getPathParts ( this path ) : IList
path this
Résultat IList