StringExtensions
Useful methods for string objects.
Collapses all spaces in the given string.
Collapses and strips all spaces in the given string.
Examines if a the given list of string contains a certain element.
Creates a CSS function from the string with the given argument.
Serializes the string to a CSS string.
Converts the given string to an integer.
Converts the given string to an integer.
Checks if the given string has a certain character at a specific
index. The index is optional (default is 0).
Checks if the provided string starts with the given value, either by exactly matching it,
or by comparing against the start including an additional dash character.
Replaces characters in names and values that cannot be expressed by using the given
encoding with &#...; base-10 unicode point.
Transforms the given string to lower case by the HTML specification.
Checks if two strings are exactly equal.
Checks if the given string satisfies the rules for a custom element name.
Checks if two strings are equal when viewed case-insensitive.
Examines if the given element is equal to one of the given elements.
Examines if the given element is equal to one of the given elements.
public static bool IsOneOf(this string element, string item1, string item2, string item3, string item4)
Examines if the given element is equal to one of the given elements.
public static bool IsOneOf(this string element, string item1, string item2, string item3, string item4, string item5)
Examines if the given element is equal to one of the given elements.
Replaces every occurrence of a "CR" (U+000D) character not followed
by a "LF" (U+000A) character, and every occurrence of a "LF"
(U+000A) character not preceded by a "CR" (U+000D) character, by a
two-character string consisting of a U+000D CARRIAGE RETURN "CRLF"
(U+000A) character pair.
Converts the given value to a sandbox flag.
Replaces the first occurance of the string search with replace.
Splits the string on commas.
Splits the string on space characters.
Splits the char array with the given char delimiter.
Splits the string with the given char delimiter and trims the leading and tailing spaces.
Strips all leading and trailing space characters from the given char array.
Strips all line breaks from the given string.
Converts the given value to a boolean (or not).
Converts the given value to a double (or not).
Converts the current string to one of the encoding types.
Converts the given value to an enumeration value (or not).
Converts the current string to one of the form methods.
Converts the given value to an integer (or not).
Converts the given value to an unsigned integer (or not).
Decodes the provided percent encoded string. An exception is thrown
in case of an invalid input value.
Replaces characters in names and values that should not be in URL
values. Replaces the bytes 0x20 (U+0020 SPACE if interpreted as
ASCII) with a single 0x2B byte ("+" (U+002B) character if
interpreted as ASCII). If a byte is not in the range 0x2A, 0x2D,
0x2E, 0x30 to 0x39, 0x41 to 0x5A, 0x5F, 0x61 to 0x7A, it is
replaced with its hexadecimal value (zero-padded if necessary),
starting with the percent sign.