Supported Clients
SmartClient
WebClient
NGClient
MobileClient

Property Summary
Number
length
Gives the length of the string.

Methods Summary
String
anchor(nameAttribute)
returns a copy of the string embedded within an anchor <A> tag set.
String
big()
returns a copy of the string embedded within an <BIG> tag set.
String
blink()
returns a copy of the string embedded within an <BLINK> tag set.
String
bold()
returns a copy of the string embedded within an <B> tag set.
Number
charAt(index)
returns a character of the string.
Number
charCodeAt(index)
returns a decimal code of the char in the string.
String
concat(string2)
returns a string that appends the parameter string to the string.
String
concat(string2, stringN)
returns a string that appends the parameter string to the string.
String
endsWith(searchString)
Determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
String
endsWith(searchString, length)
Determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
Boolean
equals(other)
returns a boolean that checks if the given string is equal to the string
Boolean
equalsIgnoreCase(other)
returns a boolean that checks if the given string is equal to the string ignoring case
String
fixed()
returns a copy of the string embedded within an anchor <TT> tag set.
String
fontcolor(color)
returns a copy of the string embedded within an <FONT> tag set, the color param is assigned the the color attribute.
String
fontsize(size)
returns a copy of the string embedded within an <FONT> tag set, The size param is set to the SIZE attribute
String
fromCharCode(num)
returns a string created by using the specified sequence of Unicode values.
String
includes()
Determines whether one string may be found within another string.
Number
indexOf(searchValue, fromIndex)
returns the found index of the given string in string.
String
italics()
returns a copy of the string embedded within an <I> tag set
Number
lastIndexOf(searchValue, fromIndex)
returns the found index of the given string in string from the end.
String
link(hrefAttribute)
returns a copy of the string embedded within an <A> tag set.
Number
localeCompare(otherString)

Array
match(regexp)
returns an array of strings within the current string that matches the regexp.
String
normalize()
Returns the Unicode Normalization Form of the string.
String
normalize(form)
Returns the Unicode Normalization Form of the string.
String
repeat(count)
Constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together.
String
replace(regexp, function)
returns a new string where the matches of the given regexp are replaced by the return value of the function.
String
replace(regexp, newSubStr)
returns a new string where the matches of the given reg exp are replaced by newSubStr.
String
replace(substr, function)
returns a new string where the first match of the given substr is replaced by the return value of the function.
String
replace(substr, newSubStr)
returns a new string where the first match of the given substr is replaced by newSubStr.
Number
search(regexp)
returns an index where the first match is found of the regexp
String
slice(beginSlice)
returns a substring of the string.
String
slice(beginSlice, endSlice)
returns a substring of the string.
String
small()
returns a copy of the string embedded within an <SMALL> tag set.
String
split(separator, limit)
returns an array of objects whose elements are segments of the current string.
String
split(separator, limit)
returns an array of objects whose elements are segments of the current string.
String
startsWith(searchString)
Determines whether a string begins with the characters of a specified string, returning true or false as appropriate.
String
startsWith(searchString, position)
Determines whether a string begins with the characters of a specified string, returning true or false as appropriate.
String
strike()
returns a copy of the string embedded within an <STRIKE> tag set.
String
sub()
returns a copy of the string embedded within an <SUB> tag set.
String
substr(start)
returns a substring of the string from the start with the number of chars specified.
String
substr(start, length)
returns a substring of the string from the start with the number of chars specified.
String
substring(indexA)
Returns a substring of the string from the start index until the end index.
String
substring(indexA, indexB)
Returns a substring of the string from the start index until the end index.
String
sup()
returns a copy of the string embedded within an <SUP> tag set.
String
toLocaleLowerCase()

String
toLocaleUpperCase()

String
toLowerCase()
returns a string with all lowercase letters of the current string.
String
toUpperCase()
returns a string with all uppercase letters of the current string.
String
trim()
Returns the string stripped of whitespace from both ends.

Property Details

length

Gives the length of the string.

Returns

Number

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.length;

Methods Details

anchor(nameAttribute)

returns a copy of the string embedded within an anchor <A> tag set.

Parameters

String
nameAttribute
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.anchor();

big()

returns a copy of the string embedded within an <BIG> tag set.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.big();

blink()

returns a copy of the string embedded within an <BLINK> tag set.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.blink();

bold()

returns a copy of the string embedded within an <B> tag set.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.bold();

charAt(index)

returns a character of the string.

Parameters

Number
index
;

Returns

Number

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.charAt(integer_position);

charCodeAt(index)

returns a decimal code of the char in the string.

Parameters

Number
index
;

Returns

Number

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.charCodeAt(integer_position);

concat(string2)

returns a string that appends the parameter string to the string.

Parameters

String
string2
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.concat(string);

concat(string2, stringN)

returns a string that appends the parameter string to the string.

Parameters

String
string2
;
String
stringN
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.concat(string);

endsWith(searchString)

Determines whether a string ends with the characters of a specified string, returning true or false as appropriate.

Parameters

String
searchString
The characters to be searched for at the end of str.

Returns

String true if the given characters are found at the end of the string; otherwise, false

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

var str1 = 'Cats are the best!';
 application.output(str1.endsWith('best', 17));

endsWith(searchString, length)

Determines whether a string ends with the characters of a specified string, returning true or false as appropriate.

Parameters

String
searchString
The characters to be searched for at the end of str.
Number
length
If provided, it is used as the length of str. Defaults to str.length.

Returns

String true if the given characters are found at the end of the string; otherwise, false

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

var str1 = 'Cats are the best!';
 application.output(str1.endsWith('best', 17));

equals(other)

returns a boolean that checks if the given string is equal to the string

Parameters

String
other
;

Returns

Boolean

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.equals(string);

equalsIgnoreCase(other)

returns a boolean that checks if the given string is equal to the string ignoring case

Parameters

String
other
;

Returns

Boolean

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.equalsIgnoreCase(string);

fixed()

returns a copy of the string embedded within an anchor <TT> tag set.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.fixed();

fontcolor(color)

returns a copy of the string embedded within an <FONT> tag set, the color param is assigned the the color attribute.

Parameters

String
color
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.fontcolor(color);

fontsize(size)

returns a copy of the string embedded within an <FONT> tag set, The size param is set to the SIZE attribute

Parameters

Number
size
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.fontsize(size);

fromCharCode(num)

returns a string created by using the specified sequence of Unicode values.

Parameters

Array
num
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

String.fromCharCode(num)
// String.fromCharCode(num1,num2,num3)

includes()

Determines whether one string may be found within another string.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.includes('foo');

indexOf(searchValue, fromIndex)

returns the found index of the given string in string.

Parameters

String
searchValue
;
Number
fromIndex
;

Returns

Number

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.indexOf(string,startPosition);

italics()

returns a copy of the string embedded within an <I> tag set

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.italics();

lastIndexOf(searchValue, fromIndex)

returns the found index of the given string in string from the end.

Parameters

String
searchValue
;
Number
fromIndex
;

Returns

Number

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.lastIndexOf(string,startPosition);

link(hrefAttribute)

returns a copy of the string embedded within an <A> tag set.

Parameters

String
hrefAttribute
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.link(url);

localeCompare(otherString)

Parameters

String
otherString
;

Returns

Number

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

var s = "Have a nice day!";
application.output(s.localeCompare("Hello"));

match(regexp)

returns an array of strings within the current string that matches the regexp.

Parameters

RegExp
regexp
;

Returns

Array

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.match(regexpr);

normalize()

Returns the Unicode Normalization Form of the string. (defaults to "NFC" form)

Returns

String A string containing the Unicode Normalization Form of the given string.

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

normalize(form)

Returns the Unicode Normalization Form of the string.
form param can be one of "NFC", "NFD", "NFKC", or "NFKD", specifying the Unicode Normalization Form. If omitted or undefined, "NFC" is used.

These values have the following meanings:

"NFC"
Canonical Decomposition, followed by Canonical Composition.
"NFD"
Canonical Decomposition.
"NFKC"
Compatibility Decomposition, followed by Canonical Composition.
"NFKD"
Compatibility Decomposition.

Parameters

String
form
param can be one of "NFC", "NFD", "NFKC", or "NFKD",

Returns

String A string containing the Unicode Normalization Form of the given string.

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

var string1 = '\u00F1';           // ?
var string2 = '\u006E\u0303';     // ?

string1 = string1.normalize('NFD');
string2 = string2.normalize('NFD');

application.output(string1 === string2); // true
application.output(string1.length);      // 2
application.output(string2.length);      // 2

repeat(count)

Constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together.

Parameters

Number
count
An integer between 0 and +Infinity, indicating the number of times to repeat the string.

Returns

String A new string containing the specified number of copies of the given string.

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

var str = 'abc'.repeat(2); // 'abcabc'

replace(regexp, function)

returns a new string where the matches of the given regexp are replaced by the return value of the function.
The function parameter is the function to be invoked to create the new substring (to put in place of the substring received from parameter #1).

Parameters

RegExp
regexp
;
Function
function
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

//the callback definition
function replacer(match, p1, p2, p3, offset, string){
		// match is the matched substring
		// p1 is non-digits, p2 digits, and p3 non-alphanumerics
		// offset is the offset of the matched substring within the total string being examined
		// string is the total string being examined
 	return [p1, p2, p3].join(' - ');
}
// using replace method with replacer callback
newString = "abc12345#$*%".replace(/([^\d]*)(\d*)([^\w]*)/, replacer);

replace(regexp, newSubStr)

returns a new string where the matches of the given reg exp are replaced by newSubStr.

Parameters

RegExp
regexp
;
String
newSubStr
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.replace(regexp,newSubStr);
//var re = /(\w+)\s(\w+)/;
//var str = "John Smith";
//var newstr = str.replace(re, "$2, $1");
//application.output(newstr);

replace(substr, function)

returns a new string where the first match of the given substr is replaced by the return value of the function.
The function parameter is the function to be invoked to create the new substring (to put in place of the substring received from parameter #1).

Parameters

String
substr
;
Function
function
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

// the callback definition
function replacer(match){
		return match.toUpperCase()
}
// using replace method with replacer callback
var newString = "abc".replace("a", replacer);

replace(substr, newSubStr)

returns a new string where the first match of the given substr is replaced by newSubStr.

Parameters

String
substr
;
String
newSubStr
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.replace(substr,newSubStr);

search(regexp)

returns an index where the first match is found of the regexp

Parameters

RegExp
regexp
;

Returns

Number

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.search(regexpr);

slice(beginSlice)

returns a substring of the string.

Parameters

Number
beginSlice
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.slice(start,end);

slice(beginSlice, endSlice)

returns a substring of the string.

Parameters

Number
beginSlice
;
Number
endSlice
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.slice(start,end);

small()

returns a copy of the string embedded within an <SMALL> tag set.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.small();

split(separator, limit)

returns an array of objects whose elements are segments of the current string.

Parameters

RegExp
separator
Specifies the string which denotes the points at which each split should occur. If separator is an empty string, str is converted to an array of characters.
Number
limit
Optional integer specifying a limit on the number of splits to be found.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

var myString = 'Hello 1 word. Sentence number 2.';
var splits = myString.split(new RegExp(/(\d)/), 2);
application.output(splits); //prints [Hello , 1]

split(separator, limit)

returns an array of objects whose elements are segments of the current string.

Parameters

String
separator
Specifies the string which denotes the points at which each split should occur. If separator is an empty string, str is converted to an array of characters.
Number
limit
Optional integer specifying a limit on the number of splits to be found.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

var myString = 'Hello 1 word. Sentence number 2.';
var splits = myString.split(' ');
application.output(splits);

startsWith(searchString)

Determines whether a string begins with the characters of a specified string, returning true or false as appropriate.

Parameters

String
searchString
The characters to be searched for at the start of this string.

Returns

String true if the given characters are found at the beginning of the string; otherwise, false

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

var str1 = 'Cats are the best!';
 application.output(str1.startsWith('Cats'));

startsWith(searchString, position)

Determines whether a string begins with the characters of a specified string, returning true or false as appropriate.

Parameters

String
searchString
The characters to be searched for at the start of this string.
Number
position
The position in this string at which to begin searching for searchString. Defaults to 0.

Returns

String true if the given characters are found at the beginning of the string; otherwise, false

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

var str1 = 'Cats are the best!';
 application.output(str1.startsWith('Cats'));

strike()

returns a copy of the string embedded within an <STRIKE> tag set.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.strike();

sub()

returns a copy of the string embedded within an <SUB> tag set.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.sub();

substr(start)

returns a substring of the string from the start with the number of chars specified.

Parameters

Number
start
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.substr(start, number_of_chars);

substr(start, length)

returns a substring of the string from the start with the number of chars specified.

Parameters

Number
start
;
Number
length
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.substr(start, number_of_chars);

substring(indexA)

Returns a substring of the string from the start index until the end index.

Parameters

Number
indexA
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.substring(start, end);

substring(indexA, indexB)

Returns a substring of the string from the start index until the end index.

Parameters

Number
indexA
;
Number
indexB
;

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.substring(start, end);

sup()

returns a copy of the string embedded within an <SUP> tag set.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.sup();

toLocaleLowerCase()

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

var s = "Have a nice day!";
application.output(s.toLocaleLowerCase());

toLocaleUpperCase()

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

var s = "Have a nice day!";
application.output(s.toLocaleUpperCase());

toLowerCase()

returns a string with all lowercase letters of the current string.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.toLowerCase();

toUpperCase()

returns a string with all uppercase letters of the current string.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.toUpperCase();

trim()

Returns the string stripped of whitespace from both ends.

Returns

String

Supported Clients

SmartClient,WebClient,NGClient,MobileClient

Sample

string.trim();