StringExtensions Class

Telerik ILS Common String Extenstion Methods

StringExtensions Class
Provides various extension methods for System.String.
Inheritance Hierarchy
SystemObject  Telerik.ILS.CommonStringExtensions

Namespace: Telerik.ILS.Common
Assembly: StringExtensions (in StringExtensions.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static class StringExtensions
<ExtensionAttribute>
Public NotInheritable Class StringExtensions
[ExtensionAttribute]
public ref class StringExtensions abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type StringExtensions =  class end

The StringExtensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCapitalizeFirstLetter
Capitalizes only the first letter of a System.String value.
Public methodStatic memberConvertCyrillicToLatinLetters
Converts the cyrillic letters of a word using their phonetic representations in latin form.
Public methodStatic memberConvertLatinToCyrillicKeyboard
Converts the latin letters of a string to their equivalent in a standard cyrillic layout keyboard.
Public methodStatic memberGetFileExtension
Returns the file extension of a string representing a full file name.
Public methodStatic memberGetFirstCharacters
Gets a number of characters in a string starting from the beginning. If the number of characters to get is bigger than the string length, returns the whole string. Throws a System.ArguemntOutOfRange exception if the number of characters is less than 0.
Public methodStatic memberGetStringBetween
Extracts the first occurance of a string between two other strings. Returns empty string if either the start or the end strings cannot be found. Start and end string values are not included in the result.
Public methodStatic memberToBoolean
Parses string values "true", "ok", "yes", "1", "да" as true and all others as false.
Public methodStatic memberToByteArray
Converts the curret string to an array of integers, representing the byte values in decimal of its internal memory representation.
Public methodStatic memberToContentType
Returns information about the content type of a file extension.
Public methodStatic memberToDateTime
Converts the specified string representation of a date and time to its System.DateTime equivalent and returns a value that indicates whether the conversion succeeded.
Public methodStatic memberToInteger
Converts the string representation of a number to its 32-bit signed integer equivalent. If the conversion failed the return value is 0.
Public methodStatic memberToLong
Converts the string representation of a number to its 64-bit signed integer equivalent. If the conversion failed the return value is 0.
Public methodStatic memberToMd5Hash
Converts the input string to a byte array and computes the hash.
Public methodStatic memberToShort
Converts the string representation of a number to its 16-bit signed integer equivalent. If the conversion failed the return value is 0.
Public methodStatic memberToValidLatinFileName
Replaces all empty spaces with "-" and converts all cyrillic letters to their phonetic equivalent in latin. Also removes any non-alphanumeric characters excluding "_" and ".".
Public methodStatic memberToValidUsername
Replaces any non latin letters to their phonetic latin equivalent and removes any non-alphanumeric characters excluding "_" and ".".
Top
See Also