C# Класс Meek.StringExtension

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Описание методов

Contains() публичный статический Метод

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
Результат bool

IsInteger() публичный статический Метод

Checks if the string value is an integer
public static IsInteger ( this source ) : bool
source this source string
Результат bool

IsIntegerOnly() публичный статический Метод

Checks if the string contains integers only
public static IsIntegerOnly ( this source ) : bool
source this source string
Результат bool

IsNumber() публичный статический Метод

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
Результат bool

IsNumberOnly() публичный статический Метод

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
Результат bool

IsValidEmailAddress() публичный статический Метод

Returns true if the source string is a valid Email Address Format
public static IsValidEmailAddress ( this source ) : bool
source this String to Check format
Результат bool

IsValidUrl() публичный статический Метод

Checks if the String is a valid URL format
public static IsValidUrl ( this source ) : bool
source this String to Check
Результат bool

MD5() публичный статический Метод

Converts string into MD5 hash
public static MD5 ( this source ) : string
source this string
Результат string

Nl2Br() публичный статический Метод

Replaces strings line breaks with html tag
public static Nl2Br ( this source ) : string
source this string
Результат string

Reduce() публичный статический Метод

Reduce String to shorter preview
public static Reduce ( this source, int count ) : string
source this source string
count int reduce length
Результат string

Reduce() публичный статический Метод

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
Результат string

RemoveDiacritics() публичный статический Метод

Removes diacritics character in a string
public static RemoveDiacritics ( this source ) : string
source this string
Результат string

RemoveSpaces() публичный статический Метод

Removes all emtpy spaces
public static RemoveSpaces ( this source ) : string
source this source string
Результат string

Reverse() публичный статический Метод

Reverse the source string
public static Reverse ( this source ) : string
source this String to be reversed
Результат string

UrlAvailable() публичный статический Метод

Checks if the URL string is available
public static UrlAvailable ( this source ) : bool
source this URL string
Результат bool