C# Class CCNet.Build.Common.Extensions

Some extension methods.
Afficher le fichier Open project: shuruev/CCNet.Extensions

Méthodes publiques

Méthode Description
AsciiOnly ( this text ) : string

Filters out ASCII characters only, including some other specified characters.

CleanWhitespaces ( this text ) : string

Converts all whitespace characters to spaces and removes double whitespaces.

CreateDirectoryIfNotExists ( this path ) : void

Creates directory if it does not exist.

RemoveFromEnd ( this originalText, string textToRemove ) : string

Removes specified text from the ending of the original string.

RemoveFromStart ( this originalText, string textToRemove ) : string

Removes specified text from the beginning of the original string.

ToDetailedString ( this dateTime ) : string

Gets detailed date/time description in two time zones.

Method Details

AsciiOnly() public static méthode

Filters out ASCII characters only, including some other specified characters.
public static AsciiOnly ( this text ) : string
text this
Résultat string

CleanWhitespaces() public static méthode

Converts all whitespace characters to spaces and removes double whitespaces.
public static CleanWhitespaces ( this text ) : string
text this
Résultat string

CreateDirectoryIfNotExists() public static méthode

Creates directory if it does not exist.
public static CreateDirectoryIfNotExists ( this path ) : void
path this
Résultat void

RemoveFromEnd() public static méthode

Removes specified text from the ending of the original string.
public static RemoveFromEnd ( this originalText, string textToRemove ) : string
originalText this
textToRemove string
Résultat string

RemoveFromStart() public static méthode

Removes specified text from the beginning of the original string.
public static RemoveFromStart ( this originalText, string textToRemove ) : string
originalText this
textToRemove string
Résultat string

ToDetailedString() public static méthode

Gets detailed date/time description in two time zones.
public static ToDetailedString ( this dateTime ) : string
dateTime this
Résultat string