C# Class Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions.StringExtensions

String extension methods
ファイルを表示 Open project: Azure/azure-powershell

Public Methods

Method Description
CoalesceString ( this original ) : string

Coalesces a string.

ConcatStrings ( this source, string separator = null ) : string

Concatenates a number of strings with given separators.

EqualsAsLocation ( this location1, string location2 ) : bool

Compare two location strings.

EqualsInsensitively ( this original, string otherString ) : bool

Compares two string values insensitively.

IsDateTime ( this source, string format, DateTimeStyles styles ) : bool

Determines whether the specified source string is a valid date time.

IsDecimal ( this source, NumberStyles allowedNumberStyle ) : bool

Determines whether the specified source string is a valid decimal.

SplitRemoveEmpty ( this source ) : string[]

Splits the string with given separators and removes empty entries.

StartsWithInsensitively ( this original, string otherString ) : bool

Compares two string values insensitively.

ToNormalizedLocation ( this location ) : string

Normalize a location string.

Method Details

CoalesceString() public static method

Coalesces a string.
public static CoalesceString ( this original ) : string
original this The original string.
return string

ConcatStrings() public static method

Concatenates a number of strings with given separators.
public static ConcatStrings ( this source, string separator = null ) : string
source this The source strings.
separator string The separator string.
return string

EqualsAsLocation() public static method

Compare two location strings.
public static EqualsAsLocation ( this location1, string location2 ) : bool
location1 this The first location string.
location2 string The second location string.
return bool

EqualsInsensitively() public static method

Compares two string values insensitively.
public static EqualsInsensitively ( this original, string otherString ) : bool
original this The original string.
otherString string The other string.
return bool

IsDateTime() public static method

Determines whether the specified source string is a valid date time.
public static IsDateTime ( this source, string format, DateTimeStyles styles ) : bool
source this The source.
format string The format.
styles DateTimeStyles The styles.
return bool

IsDecimal() public static method

Determines whether the specified source string is a valid decimal.
public static IsDecimal ( this source, NumberStyles allowedNumberStyle ) : bool
source this The source.
allowedNumberStyle NumberStyles The allowed number style.
return bool

SplitRemoveEmpty() public static method

Splits the string with given separators and removes empty entries.
public static SplitRemoveEmpty ( this source ) : string[]
source this The source string.
return string[]

StartsWithInsensitively() public static method

Compares two string values insensitively.
public static StartsWithInsensitively ( this original, string otherString ) : bool
original this The original string.
otherString string The other string.
return bool

ToNormalizedLocation() public static method

Normalize a location string.
public static ToNormalizedLocation ( this location ) : string
location this The location string.
return string