C# Class Meek.StringExtension

Afficher le fichier Open project: klintz/Meek

Méthodes publiques

Méthode Description
Contains ( this source, string toCheck, System.StringComparison comparison ) : bool

Checks if the source string contains the specified string to check based on the comparison contstraint

IsInteger ( this source ) : bool

Checks if the string value is an integer

IsIntegerOnly ( this source ) : bool

Checks if the string contains integers only

IsNumber ( this source, bool floatpoint ) : bool

Checks if the specified string is a number

IsNumberOnly ( this source, bool floatpoint ) : bool

Checks if the string contains only digits or float-point

IsValidEmailAddress ( this source ) : bool

Returns true if the source string is a valid Email Address Format

IsValidUrl ( this source ) : bool

Checks if the String is a valid URL format

MD5 ( this source ) : string

Converts string into MD5 hash

Nl2Br ( this source ) : string

Replaces strings line breaks with html tag

Reduce ( this source, int count ) : string

Reduce String to shorter preview

Reduce ( this source, int count, string endings ) : string

Reduce String to shorter preview with a specified ending string

RemoveDiacritics ( this source ) : string

Removes diacritics character in a string

RemoveSpaces ( this source ) : string

Removes all emtpy spaces

Reverse ( this source ) : string

Reverse the source string

UrlAvailable ( this source ) : bool

Checks if the URL string is available

Method Details

Contains() public static méthode

Checks if the source string contains the specified string to check based on the comparison contstraint
public static Contains ( this source, string toCheck, System.StringComparison comparison ) : bool
source this Source String
toCheck string String to Check
comparison System.StringComparison StringComparison constraint
Résultat bool

IsInteger() public static méthode

Checks if the string value is an integer
public static IsInteger ( this source ) : bool
source this source string
Résultat bool

IsIntegerOnly() public static méthode

Checks if the string contains integers only
public static IsIntegerOnly ( this source ) : bool
source this source string
Résultat bool

IsNumber() public static méthode

Checks if the specified string is a number
public static IsNumber ( this source, bool floatpoint ) : bool
source this source string
floatpoint bool floating point flag
Résultat bool

IsNumberOnly() public static méthode

Checks if the string contains only digits or float-point
public static IsNumberOnly ( this source, bool floatpoint ) : bool
source this source string
floatpoint bool float point flag
Résultat bool

IsValidEmailAddress() public static méthode

Returns true if the source string is a valid Email Address Format
public static IsValidEmailAddress ( this source ) : bool
source this String to Check format
Résultat bool

IsValidUrl() public static méthode

Checks if the String is a valid URL format
public static IsValidUrl ( this source ) : bool
source this String to Check
Résultat bool

MD5() public static méthode

Converts string into MD5 hash
public static MD5 ( this source ) : string
source this string
Résultat string

Nl2Br() public static méthode

Replaces strings line breaks with html tag
public static Nl2Br ( this source ) : string
source this string
Résultat string

Reduce() public static méthode

Reduce String to shorter preview
public static Reduce ( this source, int count ) : string
source this source string
count int reduce length
Résultat string

Reduce() public static méthode

Reduce String to shorter preview with a specified ending string
public static Reduce ( this source, int count, string endings ) : string
source this source string
count int reduce length
endings string ending string
Résultat string

RemoveDiacritics() public static méthode

Removes diacritics character in a string
public static RemoveDiacritics ( this source ) : string
source this string
Résultat string

RemoveSpaces() public static méthode

Removes all emtpy spaces
public static RemoveSpaces ( this source ) : string
source this source string
Résultat string

Reverse() public static méthode

Reverse the source string
public static Reverse ( this source ) : string
source this String to be reversed
Résultat string

UrlAvailable() public static méthode

Checks if the URL string is available
public static UrlAvailable ( this source ) : bool
source this URL string
Résultat bool