StringExtensions Class
Extensions of string.
Namespace
Songhay.Extensions
Base Types
  • object
graph BT Type-->Base0["object"] Type["StringExtensions"] class Type type-node

Syntax

public static class StringExtensions

Methods

Name Return Value Summary
CsvSplit(string) string[]
Splits CSV text format into an array of string.
static
EqualsInvariant(string, string, bool) bool
Returns true when the strings are equal without regard to cultural locales.
static
EqualsInvariant(string, string) bool
Returns true when the strings are equal without regard to cultural locales or casing.
static
EscapeInterpolation(string) string
Escapes the interpolation tokens of System.String.Format(System.String,System.Object[]).
static
FromCamelCaseToEnumerable(string) IEnumerable<string>
Converts camel-case string to IEnumerable<T>.
static
FromSnakeToCaps(string) string
Replaces “snake” underscores with caps of first char after the underscore.
static
In(string, string, char) bool
Determines whether the specified input is in the delimited values.
static
In(string, string) bool
Determines whether the specified input is in the comma-delimited values.
static
InDoubleQuotes(string) string
Returns string in double quotes.
static
InDoubleQuotesOrDefault(string, string) string
Returns string in double quotes or default.
static
InsertSpacesBeforeCaps(string) IEnumerable<char>
Inserts the spaces before caps.
static
IsByte(string, Predicate<byte>?) bool
Determines whether the specified input is byte.
static
IsByte(string) bool
Determines whether the specified input is byte.
static
IsDecimal(string, Predicate<decimal>?) bool
Determines whether the specified input is decimal.
static
IsDecimal(string) bool
Determines whether the specified input is decimal.
static
IsInteger(string, Predicate<int>?) bool
Determines whether the specified input is integer.
static
IsInteger(string) bool
Determines whether the specified input is integer.
static
IsLong(string, Predicate<long>?) bool
Determines whether the specified input is long.
static
IsLong(string) bool
Determines whether the specified input is long.
static
IsTelephoneNumber(string) bool
Determines whether the specified input is a telephone number.
static
IsUnc(string) bool
Determines whether the specified input is a UNC.
static
LooksLikeEmailAddress(string) bool
Determines whether the specified input looks like an email address.
static
RemoveDiacritics(string) string
Remove accent from strings
static
Reverse(string) string
Reverse the string from http://en.wikipedia.org/wiki/Extension_method
static
ToAsciiLettersWithSpacer(string, char) string
Converts the String into ASCII letters with spacer.
static
ToAsciiLettersWithSpacer(string) string
Converts the String into a ASCII letters with spacer \0.
static
ToBlogSlug(string) string
Converts the String into a blog slug.
static
ToCamelCase(string) string
Converts the String into camel case by lower-casing the first character.
static
ToDigitsOnly(string) string
Converts the String into digits only.
static
ToIntString(string, string) string
Prepares a string to be converted to int.
static
ToIntString(string) string
Prepares a string to be converted to int.
static
ToNumberOfDirectoryLevels(string) int
Returns the number of directory levels based on the conventions ../ or ..\.
static
ToNumericString(string, string) string
Converts the string into a numeric format for parsing.
static
ToNumericString(string) string
Converts the string into a numeric format for parsing.
static
ToPascalCase(string) string
Converts the String into camel case by upper-casing the first character.
static
ToSnakeCase(string) string
Converts the String into camel case then replaces every upper case character with an underscore and its lowercase equivalent.
static
ToSubstringInContext(string, string, int) string
Formats the string into a shortened form, showing the search text in context.
static
Truncate(string, int, string) string
Truncates the specified input.
static
Truncate(string, int) string
Truncates the specified input to 16 characters. The input. The length.
static
Truncate(string) string
Truncates the specified input to 16 characters. The input.
static