Class StringExtensions
Extension methods for System.String.
Inheritance
Inherited Members
Namespace: Mozzarella
Assembly: cs.temp.dll.dll
Syntax
public static class StringExtensions
Methods
Name | Description |
---|---|
AddPrefix(String, String) | If |
AddPrefix(String, String, Boolean) | If |
AddSuffix(String, String) | If |
AddSuffix(String, String, Boolean) | If |
AfterFirst(String, String) | Returns the portion of |
AfterFirst(String, String, StringComparison) | Returns the portion of |
AfterLast(String, String) | Returns the portion of |
AfterLast(String, String, StringComparison) | Returns the portion of |
BeforeFirst(String, String) | Returns the portion of |
BeforeFirst(String, String, StringComparison) | Returns the portion of |
BeforeLast(String, String) | Returns the portion of |
BeforeLast(String, String, StringComparison) | Returns the portion of |
CICompare(String, String) | Performs a case insensitive comparison of two strings, returning an integer indicating if they match, or one is less than/greater than the other. |
CIContains(String, String) | Returns true if |
CIEquals(String, String) | Performs a case insensitive comparison of two strings, returning a boolean indicating if they match. |
CIReplace(String, String, String) | Replaces all instances of a substring in a given string with another using a case insensitve, current culture based comparisoon. |
Coalesce(String, CoalesceOptions, String) | Returns |
Coalesce(String, CoalesceOptions, String[]) | Returns |
Coalesce(String, String) | Returns |
Coalesce(String, String[]) | Returns |
Contains(String, String, StringComparison) | Returns true if |
ContainsOnly(String, Char[]) | Returns true if |
ContainsOnly(String, IEnumerable<Char>) | Returns true if |
IndexOfFirstDifference(String, String) | Returns the original character position of the first difference between two strings. If the strings are identical, returns -1. |
IsAllDigits(String) | Determines whether |
IsAlphanumeric(String) | Returns true if |
IsNullOrEmpty(String) | Returns true if |
IsNullOrWhiteSpace(String) | Returns true if |
IsOnlyAlphas(String) | Returns true if |
IsOnlyDigits(String) | Returns true if |
LevenshteinDistanceTo(String, String) | Returns an integer representing the Levenshtein distance (https://en.wikipedia.org/wiki/Levenshtein_distance) between two strings. Often used to detect typos or misspellings by checking for small distances. |
Like(String, String, Boolean) | Performs an operation similar to a T-Sql 'like' on a string. |
NullIfEmpty(String) | Returns null if |
OCICompare(String, String) | Performs a case insensitive ordinal comparison of two strings, returning an integer indicating if they match, or one is less than/greater than the other. |
OCIContains(String, String) | Returns true if |
OCIEquals(String, String) | Performs an "ordinal" and case insensitive comparison of two strings, returning a boolean indicating if they match. |
OCIReplace(String, String, String) | Replaces all instances of a substring in a given string with another using an ordinal and case insenstive comparison. |
OEquals(String, String) | Performs an "ordinal" comparison of two strings, returning a boolean indicating if they match. |
PascalCaseToWords(String) | Converts a string in pascal or camel case to a human readable string of words. |
RemoveAllExcept(String, Char[]) | Removes all characters that are not (latin) alphabet characters (A-Z, a-z) or numerics (0-9). |
RemoveAllExcept(String, IEnumerable<Char>) | Removes all characters that are not (latin) alphabet characters (A-Z, a-z) or numerics (0-9). |
RemoveAllWhiteSpace(String) | Removes all whitespace characters, regardless of where they appear in |
RemoveNonAlphanumerics(String) | Removes all characters that are not (latin) alphabet characters (A-Z, a-z) or numerics (0-9). |
RemoveNonAlphas(String) | Removes all characters that are not (latin) alphabet characters (A-Z, a-z). |
Replace(String, String, String, StringComparison) | An overload for System.String.Replace(System.String,System.String) which allows manually specifying the System.StringComparison to use when locating the |
StripNonDigits(String) | Removes all non-digit characters from a string and returns the result. |
StripPrefix(String, String) | If |
StripPrefix(String, String, Boolean) | If |
StripSuffix(String, String) | If |
StripSuffix(String, String, Boolean) | If |
Truncate(String, Int32) | If |