String Class Function Manual |
Purpose
To return the ASCII code of the first character of a string.
Class
String
Usage
{int} ret = object.ASC()
Example:
->a = "A" |
See also (class function)
val
Purpose
To concatenate two string. The calling string will be concatenated by the argument string.
Class
String
Usage
{String} ret = object.CAT({String} argm1)
argm1 = string to concatenate
Example:
->a = "My name " |
See also (class function)
string operator +
COUNT
Purpose
To count the number of a string inside a string. If found the function return the number of the string, otherwise return 0.
Please note that the first position of a string is 0, zero.
Class
String
Usage
{int} ret = object.COUNT({String} argm1)
argm1 = string to be count
Example:
->a = "My name is
Noobeed" |
See also (class function)
countfrom
Purpose
To count the number of a string inside a string, starting from a specific position given by the user. If found the function return the number of the string, otherwise return 0.
Please note that the first position of a string is 0, zero.
Class
String
Usage
{int} ret = object.FINDFROM({String} argm1,{int} argm2)
argm1 = string to be found
argm2 = position to start seraching
Example:
->a = "Noobeed
Noobeed Noobeed" |
See also (class function)
count
Purpose
To delete a string from a string. A copy of the calling string will be searched theough out and, if the given string, specified by the argument, is found, it will be deleted and stored as the result.
Class
String
Usage
{String} ret = object.DEL({String} argm1)
argm1 = string to be searched, and if found, will be deleted
Example:
->s = "red green blue
blue green red red green" |
See also (class function)
replace subreplace
EXTRACT
Purpose
To extract a number of strings, separated by at least one space, from a string.
The result strings are store in a vector of string, a VecStr object. Spaces in front and after the result strings are trimmed.
Class
String
Usage
{VecStr} ret = object.EXTRACT({int} argm1)
argm1 = number of strings to be extracted
Example:
->a = "My name is
Noobeed" |
See also (class function)
no_word
Purpose
To extract a number of strings, separated by a commaa sign, from a string.
The result strings are store in a vector of string, a VecStr object. Spaces in front and after the result strings are not trimmed.
Class
String
Usage
{VecStr} ret = object.EXTRACTCSV({int} argm1)
argm1 = number of strings to be extracted
Example:
->a = "My, name, is,
Noobeed" |
See also (class function)
no_word, extract
FIND
Purpose
To find a string inside a string. If found the function return the first position at which the string is found, otherwise it return -1.
Please note that the first position of a string is 0, zero.
Class
String
Usage
{int} ret = object.FIND({String} argm1)
argm1 = string to be found
Example:
->a = "My name is
Noobeed" |
See also (class function)
findfrom, findlast
Purpose
To find a string inside a string. This function starts searching the string from a specific position, specified by the user. If found the function return the first position at which the string is found, otherwise it return -1.
Please note that the first position of a string is 0, zero.
Class
String
Usage
{int} ret = object.FINDFROM({String} argm1,{int} argm2)
argm1 = string to be found
argm2 = position to start seraching
Example:
->a = "Noobeed
Noobeed Noobeed" |
See also (class function)
find, findlast
Purpose
To find the last occurrence of a string inside a string. If found the function return the last position at which of the last occurrence of the string found, otherwise it return -1.
Please note that the first position of a string is 0, zero.
Class
String
Usage
{int} ret = object.FINDLAST({String} argm1)
argm1 = string to be found
Example:
->a = "Noobeed
and Noobeed love you" |
See also (class function)
findfrom, find
Purpose
To extract a portion of a string from the left.
Class
String
Usage
{String} ret = object.LEFT({int} argm1)
argm1 = number of characters being extracted
Example:
->a = "My name is
Noobeed" |
See also (class function)
right, sub
Purpose
To report the length of a string.
Class
String
Usage
{int} ret = object.LEN()
Example:
->a = "My name is
Noobeed" |
See also (class function)
no_word
Purpose
To change characters in a string to lowercase. Lowercase characters and numbers are not effected by this function.
Class
String
Usage
{String} ret = object.LOWER()
Example:
->a = "NOOBEED
Version 1.9" |
See also (class function)
upper
Purpose
To remove all white spaces in front of a string.
Class
String
Usage
{String} ret = object.LTRIM()
Example:
->a = "
Noobeed" |
See also (class function)
rtrim
Purpose
To report the number of words, separated by at least one space, in a string.
Class
String
Usage
{int} ret = object.NO_WORD()
Example:
->a = "My name is
Noobeed" |
See also (class function)
extract
Purpose
To find and replace a sub-string with a sub-string, both of which are specified by the user. The length of the replaced and replacing sub-string must be equal.
Class
String
Usage
{String} ret = object.REPLACE({String} argm1, {String} argm2)
argm1 = the replaced sub-string.
argm2 = the replacing sub-string.
Example:
->a = "My name is
Noobeed" |
See also (class function)
subreplace
REVERSE
Purpose
To reverse a string. If a string contains more than one word, the function will as well reverse the order of words as well as the content of each word.
Class
String
Usage
{String} ret = object.REVERSE()
Example:
->a = "My name is
Noobeed" |
See also (class function)
no_word
Purpose
To extract a portion of a string from the right.
Class
String
Usage
{String} ret = object.RIGHT({int} argm1)
argm1 = number of characters being extracted
Example:
->a = "My name is
Noobeed" |
See also (class function)
left, sub
Purpose
To remove all white spaces at the end of a string.
Class
String
Usage
{String} ret = object.RTRIM()
Example:
->a = "Noobeed
" |
See also (class function)
ltrim
Purpose
To extract a portion of a string from a specific position to a specific position. Please note that the first position of a string is 0, zero.
Class
String
Usage
{String} ret = object.SUB({int} argm1, {int} argm2)
argm1 = start position
argm2 = end position
Example:
->a = "My name is
Noobeed" |
See also (class function)
left, right
Purpose
To replace a sub-string into a string at the position given by the start and end positions specified by the user. The length of the sub-string must be exactly fitted into the specified positions.
Please note that the first position of a string is 0, zero.
Class
String
Usage
{String} ret = object.SUBREPLACE({int} argm1, {int} argm2, {String} argm3)
argm1 = start position
argm2 = end position
argm3 = the replacing sub-string.
Example:
->a = "My name is
Noobeed" |
See also (class function)
replace
UPPER
Purpose
To change characters in a string to uppercase. Uppercase characters and numbers are not effected by this function.
Class
String
Usage
{String} ret = object.UPPER()
Example:
->a = "NOOBEED
Version 1.9" |
See also (class function)
lower
Purpose
To converse a string to a number.
Class
String
Usage
{double} ret = object.VAL()
Example:
->a = "20" |
See also (class function)
asc
Purpose
To converse a string to a Vector of Integer object.
Class
String
Usage
{VecInt} ret = object.VECTOR()
Example:
->s = "ABCdef" |
See also (class function)
asc