The String objects allow you to perform advanced string manipulations. The String object can be created using the one of the following syntaxes:
var StrObject = new String("Initial value"); var FixedString = new String(256); // create an empty string, 256 characters long |
String | Creates an empty string object. |
String | Creates a new string object and assigns it a specified value. |
String | Creates a new string buffer of a specified size |
Substring | Extracts a substring by specifying the start and end positions within the original string |
Substr | Extracts a substring by specifying the start position and length of the fragment |
ToUpperCase | Converts the string to upper case |
ToLowerCase | Converts the string to lower case |
IndexOf | Searches the string for a specified substring. |
Split | Splits string into a list of values. |
Type (read only) | Returns always "string" |
Length (read only) | Returns the length of the string (in characters) |
Capacity | Specifies the current size of the underlying character buffer of this string object. |
Creates an empty string object.
Creates a new string object and assigns it a specified value.
Creates a new string buffer of a specified size
String objects created this way are intended for passing fixed string buffers to DLL libraries
Extracts a substring by specifying the start and end positions within the original string
Returns the extracted substring.
Extracts a substring by specifying the start position and length of the fragment
Returns the extracted substring.
Converts the string to upper case
Returns the string converted to upper case.
Converts the string to lower case
Returns the string converted to lower case.
Searches the string for a specified substring.
Returns the position of the substring within the searched string or -1 of the substring cannot be found.
Splits string into a list of values.
Returns an Array object containing items of an original string.