StringExtensions Methods

Telerik ILS Common String Extenstion Methods

StringExtensions Methods

The StringExtensions type exposes the following members.

Methods
  Name Description
Public method Static member CapitalizeFirstLetter
Capitalizes only the first letter of a System.String value.
Public method Static member ConvertCyrillicToLatinLetters
Converts the cyrillic letters of a word using their phonetic representations in latin form.
Public method Static member ConvertLatinToCyrillicKeyboard
Converts the latin letters of a string to their equivalent in a standard cyrillic layout keyboard.
Public method Static member GetFileExtension
Returns the file extension of a string representing a full file name.
Public method Static member GetFirstCharacters
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 method Static member GetStringBetween
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 method Static member ToBoolean
Parses string values "true", "ok", "yes", "1", "да" as true and all others as false.
Public method Static member ToByteArray
Converts the curret string to an array of integers, representing the byte values in decimal of its internal memory representation.
Public method Static member ToContentType
Returns information about the content type of a file extension.
Public method Static member ToDateTime
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 method Static member ToInteger
Converts the string representation of a number to its 32-bit signed integer equivalent. If the conversion failed the return value is 0.
Public method Static member ToLong
Converts the string representation of a number to its 64-bit signed integer equivalent. If the conversion failed the return value is 0.
Public method Static member ToMd5Hash
Converts the input string to a byte array and computes the hash.
Public method Static member ToShort
Converts the string representation of a number to its 16-bit signed integer equivalent. If the conversion failed the return value is 0.
Public method Static member ToValidLatinFileName
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 method Static member ToValidUsername
Replaces any non latin letters to their phonetic latin equivalent and removes any non-alphanumeric characters excluding "_" and ".".
Top
See Also