Class StringExtensions
Extension methods for working with strings
Inheritance
Namespace: Telerik.DataSource.Extensions
Assembly: Telerik.DataSource.dll
Syntax
public static class StringExtensions : Object
Methods
AsTitle(String)
Returns the string In Title Case Formatting
Declaration
public static string AsTitle(this string value)
Parameters
System.String
value
|
Returns
System.String
|
EscapeHtmlEntities(String)
Declaration
public static string EscapeHtmlEntities(this string html)
Parameters
System.String
html
|
Returns
System.String
|
FormatWith(String, 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
System.String
instance
A string to format. |
System.Object[]
args
An System.Object array containing zero or more objects to format. |
Returns
System.String
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. |
HasValue(String)
Declaration
public static bool HasValue(this string value)
Parameters
System.String
value
|
Returns
System.Boolean
|
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
System.String
instance
The string to check equality. |
System.String
comparing
The comparing with string. |
Returns
System.Boolean
|
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
System.String
instance
The string to check equality. |
System.String
comparing
The comparing with string. |
Returns
System.Boolean
|
JavaScriptStringEncode(String)
Escapes a string for use in JavaScript
Declaration
public static string JavaScriptStringEncode(this string value)
Parameters
System.String
value
|
Returns
System.String
|
JavaScriptStringEncode(String, Boolean)
Escapes a string for JavaScript by wrapping it in " symbols if true is passed, otherwise returns the original string.
Declaration
public static string JavaScriptStringEncode(this string value, bool addDoubleQuotes)
Parameters
System.String
value
|
System.Boolean
addDoubleQuotes
|
Returns
System.String
|
SplitPascalCase(String)
Splits a string to space-separated words in Pascal Case
Declaration
public static string SplitPascalCase(this string value)
Parameters
System.String
value
|
Returns
System.String
|
ToCamelCase(String)
Returns the string in camelCase casing
Declaration
public static string ToCamelCase(this string instance)
Parameters
System.String
instance
|
Returns
System.String
|
ToEnum<T>(String, T)
Returns the enum member the string parses to
Declaration
public static T ToEnum<T>(this string value, T defaultValue)
Parameters
System.String
value
|
T
defaultValue
|
Returns
T
|
Type Parameters
T
|