C# Класс DevUtils.PrimitivesExtensions.StringExtensions

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

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

Метод Описание
CompareNoCase ( this valueCurrent, string valueToCompare ) : bool

Compares two string objects ignoring case.

ContainedIn ( this valueCurrent, List values ) : bool

Determines if the current string is contained in the specified list of objects.

ContainedIn ( this valueCurrent, List values ) : bool

Determines if the current string is contained in the specified list of strings.

ContainedIn ( this valueCurrent, object values ) : bool

Determines if the current string is contained in the specified array of objects.

EndsWithCurrent ( this valueCurrent, string valueToCompare ) : bool

Gets a value indicating if the string ends with the specified substring for the current culture.

EndsWithOrdinalIgnoreCase ( this valueCurrent, string valueToCompare ) : bool

Gets a value indicating if the string ends with the specified substring for ordinal ignoring case.

FormatCurrent ( this format ) : string

Formats the string with the specified objects for the current culture.

FormatCurrent ( this format, object arg0 ) : string

Formats the string with the specified object for the current culture.

FormatCurrent ( this format, object arg0, object arg1 ) : string

Formats the string with the specified objects for the current culture.

FormatCurrent ( this format, object arg0, object arg1, object arg2 ) : string

Formats the string with the specified objects for the current culture.

FormatInvariant ( this format ) : string

Formats the string with the specified objects for an invariant culture.

FormatInvariant ( this format, object arg0 ) : string

Formats the string with the specified object for an invariant culture.

FormatInvariant ( this format, object arg0, object arg1 ) : string

Formats the string with the specified objects for an invariant culture.

FormatInvariant ( this format, object arg0, object arg1, object arg2 ) : string

Formats the string with the specified objects for an invariant culture.

GetDigits ( this text ) : string

Get only number characters

IndexOfAll ( this valueCurrent, string value ) : IEnumerable

Gets the indexes of all occurrences of the specified value in the string.

IndexOfCurrent ( this valueCurrent, string value ) : int

Gets the index of the first occurrence of the specified value in the string for the current culture.

IndexOfCurrent ( this valueCurrent, string value, int startIndex ) : int

Gets the index of the first occurrence of the specified value in the string for the current culture.

IndexOfOrdinalIgnoreCase ( this valueCurrent, string value ) : int

Gets the index of the first occurrence of the specified value in the string for ordinal ignoring case.

IndexOfOrdinalIgnoreCase ( this valueCurrent, string value, int startIndex ) : int

Gets the index of the first occurrence of the specified value in the string for ordinal ignoring case.

Join ( this array, string separator ) : string

Joins all elements in the specified array together separated by the specified delimiter.

Join ( this list, string separator ) : string

Joins all elements in the specified list together separated by the specified delimiter.

Left ( this text, int length ) : string

Get first N characters from string

Right ( this text, int length ) : string

Get last N characters from string

StartsWithCurrent ( this valueCurrent, string valueToCompare ) : bool

Gets a value indicating if the string begins with the specified substring for the current culture.

StartsWithOrdinalIgnoreCase ( this valueCurrent, string valueToCompare ) : bool

Gets a value indicating if the string begins with the specified substring for ordinal ignoring case.

ToUnicode ( this text ) : string

Normalize string to unicode

Remove special characters

ToUnicodeWithoutSpace ( this text ) : string

Remove all spaces and normalize string to unicode

Remove special characters

Convert space to underscore

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

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

Compares two string objects ignoring case.
public static CompareNoCase ( this valueCurrent, string valueToCompare ) : bool
valueCurrent this The current string used to compare against another string.
valueToCompare string The string to compare against the current string.
Результат bool

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

Determines if the current string is contained in the specified list of objects.
public static ContainedIn ( this valueCurrent, List values ) : bool
valueCurrent this The current string used to compare against the list of objects.
values List The list of objects used compare against the current string.
Результат bool

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

Determines if the current string is contained in the specified list of strings.
public static ContainedIn ( this valueCurrent, List values ) : bool
valueCurrent this The current string used to compare against the list of strings.
values List The list of strings used compare against the current string.
Результат bool

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

Determines if the current string is contained in the specified array of objects.
public static ContainedIn ( this valueCurrent, object values ) : bool
valueCurrent this The current string used to compare against the array of objects.
values object The array of objects used compare against the current string.
Результат bool

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

Gets a value indicating if the string ends with the specified substring for the current culture.
public static EndsWithCurrent ( this valueCurrent, string valueToCompare ) : bool
valueCurrent this The current string to compare against a substring.
valueToCompare string The substring to compare against the current string.
Результат bool

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

Gets a value indicating if the string ends with the specified substring for ordinal ignoring case.
public static EndsWithOrdinalIgnoreCase ( this valueCurrent, string valueToCompare ) : bool
valueCurrent this The current string to compare against a substring.
valueToCompare string The substring to compare against the current string.
Результат bool

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

Formats the string with the specified objects for the current culture.
public static FormatCurrent ( this format ) : string
format this The string to format.
Результат string

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

Formats the string with the specified object for the current culture.
public static FormatCurrent ( this format, object arg0 ) : string
format this The string to format.
arg0 object The object in which to format in the string.
Результат string

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

Formats the string with the specified objects for the current culture.
public static FormatCurrent ( this format, object arg0, object arg1 ) : string
format this The string to format.
arg0 object The first object in which to format in the string.
arg1 object The second object in which to format in the string.
Результат string

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

Formats the string with the specified objects for the current culture.
public static FormatCurrent ( this format, object arg0, object arg1, object arg2 ) : string
format this The string to format.
arg0 object The first object in which to format in the string.
arg1 object The second object in which to format in the string.
arg2 object The third object in which to format in the string.
Результат string

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

Formats the string with the specified objects for an invariant culture.
public static FormatInvariant ( this format ) : string
format this The string to format.
Результат string

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

Formats the string with the specified object for an invariant culture.
public static FormatInvariant ( this format, object arg0 ) : string
format this The string to format.
arg0 object The object in which to format in the string.
Результат string

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

Formats the string with the specified objects for an invariant culture.
public static FormatInvariant ( this format, object arg0, object arg1 ) : string
format this The string to format.
arg0 object The first object in which to format in the string.
arg1 object The second object in which to format in the string.
Результат string

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

Formats the string with the specified objects for an invariant culture.
public static FormatInvariant ( this format, object arg0, object arg1, object arg2 ) : string
format this The string to format.
arg0 object The first object in which to format in the string.
arg1 object The second object in which to format in the string.
arg2 object The third object in which to format in the string.
Результат string

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

Get only number characters
public static GetDigits ( this text ) : string
text this strign to get numbers
Результат string

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

Gets the indexes of all occurrences of the specified value in the string.
public static IndexOfAll ( this valueCurrent, string value ) : IEnumerable
valueCurrent this The current string in which to obtain all indexes of.
value string The value to seek for all occurrences of.
Результат IEnumerable

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

Gets the index of the first occurrence of the specified value in the string for the current culture.
public static IndexOfCurrent ( this valueCurrent, string value ) : int
valueCurrent this The current string in which to obtain the index of.
value string The value to seek.
Результат int

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

Gets the index of the first occurrence of the specified value in the string for the current culture.
public static IndexOfCurrent ( this valueCurrent, string value, int startIndex ) : int
valueCurrent this The current string in which to obtain the index of.
value string The value to seek.
startIndex int The search starting position.
Результат int

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

Gets the index of the first occurrence of the specified value in the string for ordinal ignoring case.
public static IndexOfOrdinalIgnoreCase ( this valueCurrent, string value ) : int
valueCurrent this The current string in which to obtain the index of.
value string The value to seek.
Результат int

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

Gets the index of the first occurrence of the specified value in the string for ordinal ignoring case.
public static IndexOfOrdinalIgnoreCase ( this valueCurrent, string value, int startIndex ) : int
valueCurrent this The current string in which to obtain the index of.
value string The value to seek.
startIndex int The search starting position.
Результат int

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

Joins all elements in the specified array together separated by the specified delimiter.
public static Join ( this array, string separator ) : string
array this An array of elements.
separator string The separator for each element.
Результат string

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

Joins all elements in the specified list together separated by the specified delimiter.
public static Join ( this list, string separator ) : string
list this A list of elements.
separator string The separator for each element.
Результат string

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

Get first N characters from string
public static Left ( this text, int length ) : string
text this string text
length int characters length
Результат string

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

Get last N characters from string
public static Right ( this text, int length ) : string
text this string text
length int characters length
Результат string

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

Gets a value indicating if the string begins with the specified substring for the current culture.
public static StartsWithCurrent ( this valueCurrent, string valueToCompare ) : bool
valueCurrent this The current string to compare against a substring.
valueToCompare string The substring to compare against the current string.
Результат bool

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

Gets a value indicating if the string begins with the specified substring for ordinal ignoring case.
public static StartsWithOrdinalIgnoreCase ( this valueCurrent, string valueToCompare ) : bool
valueCurrent this The current string to compare against a substring.
valueToCompare string The substring to compare against the current string.
Результат bool

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

Normalize string to unicode

Remove special characters

public static ToUnicode ( this text ) : string
text this string to normalize
Результат string

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

Remove all spaces and normalize string to unicode

Remove special characters

Convert space to underscore

public static ToUnicodeWithoutSpace ( this text ) : string
text this strign to normalize
Результат string