C# Class CCNet.Build.Common.Extensions

Some extension methods.
Mostrar archivo Open project: shuruev/CCNet.Extensions

Public Methods

Method 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 method

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

CleanWhitespaces() public static method

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

CreateDirectoryIfNotExists() public static method

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

RemoveFromEnd() public static method

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

RemoveFromStart() public static method

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

ToDetailedString() public static method

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