The following pages provide detailed information on the properties, methods and functions that are available to assist in manipulating String variables. Internally, Strings are implemented using much of the same structure and procedures as other built-in Classes. Therefore, in addition to providing classic Basic functions for operating on Strings, e.g. Len, String variable properties and methods are also available for performing many of the same operations.
A number of easy-to-use functions are provided for converting between String values and numerical values, e.g. CStr, CDbl, CInt, Hex . Each of these built-in operations is described in the section on Functions.
Table 19-95 summarizes the properties and methods of String variables that are described in greater detail in the following section.
Member | Type | Description |
---|---|---|
Method |
Compares the values of two Strings in either a case sensitive or case insensitive manner. |
|
Method |
Searches for an exact match of a substring within the string variable and returns the starting position if found (0-n). |
|
Property |
Returns the number of characters stored in a String variable. |
|
Method |
Divides the string variable value into a series of substrings based upon a specified separator character and returns the array of substrings. |
|
Method |
Returns a substring of the string variable starting at a specific character position and with the specified length. |
|
Method |
Returns a copy of the string with all lower case characters. |
|
Method |
Returns a copy of the string with all upper case characters. |
|
Method |
Trims off characters or white space from the start and end of a String variable value. |
|
Method |
Trims off characters or white space from the end of a String variable value. |
|
Method |
Trims off characters or white space from the start of a String variable value. |
Table 19-96 summarizes the String functions that are also described in greater detail in the subsequent section.
Function |
Description |
---|---|
Converts the first character of a String to its equivalent ASCII numerical code. |
|
Given a numerical ASCII code, a String that consists of the equivalent ASCII character is returned. |
|
Converts a numerical value to a String value based upon a specified output format specification. |
|
Extracts a number that has been packed in its internal bit format into a String and returns the value of the number. |
|
Searches for an exact match of a substring within a String expression and returns the starting position if found (1-n). |
|
Returns a String value that has been converted to lower case. |
|
Returns the number of characters in a String. |
|
Returns a substring of the string starting at the first character position and consisting of length number of characters. |
|
Converts the value of an expression to a specific numeric type and returns the internal bit representation of the number packed into a String value. |
|
Returns a String value that has been converted to upper case. |