ClassStringExtensions
Extension methods for working with strings
Definition
Namespace:Telerik.DataSource.Extensions
Assembly:Telerik.DataSource.dll
Syntax:
public static class StringExtensions
Inheritance: objectStringExtensions
Methods
AsTitle(string)
Returns the string In Title Case Formatting
FormatWith(string, params object[])
Replaces the format item in a specified System.String with the text equivalent of the value of a corresponding System.Object instance in a specified array.
Declaration
public static string FormatWith(this string instance, params object[] args)
Parameters
instance
A string to format.
args
object[]
An System.Object array containing zero or more objects to format.
Returns
A copy of format in which the format items have been replaced by the System.String equivalent of the corresponding instances of System.Object in args.
IsCaseInsensitiveEqual(string, string)
Determines whether this instance and another specified System.String object have the same value.
Declaration
public static bool IsCaseInsensitiveEqual(this string instance, string comparing)
Parameters
instance
The string to check equality.
comparing
The comparing with string.
Returns
true
if the value of the comparing parameter is the same as this string; otherwise, false
.
IsCaseSensitiveEqual(string, string)
Determines whether this instance and another specified System.String object have the same value.
Declaration
public static bool IsCaseSensitiveEqual(this string instance, string comparing)
Parameters
instance
The string to check equality.
comparing
The comparing with string.
Returns
true
if the value of the comparing parameter is the same as this string; otherwise, false
.
JavaScriptStringEncode(string)
Escapes a string for use in JavaScript
JavaScriptStringEncode(string, bool)
Escapes a string for JavaScript by wrapping it in " symbols if true is passed, otherwise returns the original string.
SplitPascalCase(string)
Splits a string to space-separated words in Pascal Case
ToCamelCase(string)
Returns the string in camelCase casing
ToEnum<T>(string, T)
Returns the enum member the string parses to
Declaration
public static T ToEnum<T>(this string value, T defaultValue)
Parameters
value
defaultValue
T
Returns
T