Access Keys:
Skip to content (Access Key - 0)
iServoy.com | Servoy.com | Forum index | Store | Developers | Documentation | Events | Products | Support

String

All versions
Click for all versions
Servoy 5.0.x
Toggle Sidebar
This documentation relates to an earlier version of Servoy
View this page in the current documentation or visit the current documentation home.

\\
Property Summary
Numberlength
Gives the length of the string.
\\
Method Summary
Stringanchor(nameAttribute)
returns a copy of the string embedded within an anchor <A> tag set.
Stringbig()
returns a copy of the string embedded within an <BIG> tag set.
Stringblink()
returns a copy of the string embedded within an <BLINK> tag set.
Stringbold()
returns a copy of the string embedded within an <B> tag set.
NumbercharAt(index)
returns a character of the string.
NumbercharCodeAt(index)
returns a decimal code of the char in the string.
Stringconcat(string2, stringN)
returns a string that appends the parameter string to the string.
Booleanequals(other)
returns a boolean that checks if the given string is equal to the string
BooleanequalsIgnoreCase(other)
returns a boolean that checks if the given string is equal to the string ignoring case
Stringfixed()
returns a copy of the string embedded within an anchor <TT> tag set.
Stringfontcolor(color)
returns a copy of the string embedded within an <FONT> tag set, the color param is assigned the the color attribute.
Stringfontsize(size)
returns a copy of the string embedded within an <FONT> tag set, The size param is set to the SIZE attribute
NumberindexOf(searchValue, fromIndex)
returns the found index of the given string in string.
Stringitalics()
returns a copy of the string embedded within an <I> tag set
NumberlastIndexOf(searchValue, fromIndex)
returns the found index of the given string in string from the end.
Stringlink(hrefAttribute)
returns a copy of the string embedded within an <A> tag set.
Arraymatch(regexp)
returns an array of strings within the current string that matches the regexp.
Stringreplace(regexp, newSubStr)
returns a strings where all matches of the regexp are replaced.
Numbersearch(regexp)
returns a index where the first match is found of the regexp
Stringslice(beginSlice, endSlice)
returns a substring of the string.
Stringsmall()
returns a copy of the string embedded within an <SMALL> tag set.
Stringsplit(separator, limit)
returns an array of objects whose elements are segments of the current string.
Stringstrike()
returns a copy of the string embedded within an <STRIKE> tag set.
Stringsub()
returns a copy of the string embedded within an <SUB> tag set.
Stringsubstr(start, length)
returns a substring of the string from the start with the number of chars specified.
Stringsubstring(indexA, indexB)
Returns a substring of the string from the start index until the end index.
Stringsup()
returns a copy of the string embedded within an <SUP> tag set.
StringtoLowerCase()
returns a string with all lowercase letters of the current string.
StringtoUpperCase()
returns a string with all uppercase letters of the current string.
\\
Property Details
length

Gives the length of the string.

Returns

Number

Sample
string.length;

Method Details
anchor
Stringanchor(nameAttribute)

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

Parameters

nameAttribute

Returns

String

Sample
string.anchor();
big
Stringbig()

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

Returns

String

Sample
string.big();
blink
Stringblink()

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

Returns

String

Sample
string.blink();
bold
Stringbold()

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

Returns

String

Sample
string.bold();
charAt
NumbercharAt(index)

returns a character of the string.

Parameters

index

Returns

Number

Sample
string.charAt(integer position);
charCodeAt
NumbercharCodeAt(index)

returns a decimal code of the char in the string.

Parameters

index

Returns

Number

Sample
string.charCodeAt(integer position);
concat
Stringconcat(string2, stringN)

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

Parameters

string2
[stringN]

Returns

String

Sample
string.concat(string);
equals
Booleanequals(other)

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

Parameters

other

Returns

Boolean

Sample
string.equals(string);
equalsIgnoreCase
BooleanequalsIgnoreCase(other)

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

Parameters

other

Returns

Boolean

Sample
string.equalsIgnoreCase(string);
fixed
Stringfixed()

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

Returns

String

Sample
string.fixed();
fontcolor
Stringfontcolor(color)

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

Parameters

color

Returns

String

Sample
string.fontcolor(color);
fontsize
Stringfontsize(size)

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

Parameters

size

Returns

String

Sample
string.fontsize(size);
indexOf
NumberindexOf(searchValue, fromIndex)

returns the found index of the given string in string.

Parameters

searchValue
fromIndex

Returns

Number

Sample
string.indexOf(string,startPosition);
italics
Stringitalics()

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

Returns

String

Sample
string.italics();
lastIndexOf
NumberlastIndexOf(searchValue, fromIndex)

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

Parameters

searchValue
fromIndex

Returns

Number

Sample
string.lastIndexOf(string,startPosition);
link
Stringlink(hrefAttribute)

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

Parameters

hrefAttribute

Returns

String

Sample
string.link(url);
match
Arraymatch(regexp)

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

Parameters

regexp

Returns

Array

Sample
string.match(regexpr);
replace
Stringreplace(regexp, newSubStr)

returns a strings where all matches of the regexp are replaced.

Parameters

regexp
newSubStr

Returns

String

Sample
string.replace(regexpr,replacestring);
search
Numbersearch(regexp)

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

Parameters

regexp

Returns

Number

Sample
string.search(regexpr);
slice
Stringslice(beginSlice, endSlice)

returns a substring of the string.

Parameters

beginSlice
[endSlice]

Returns

String

Sample
string.slice(start [,end]);
small
Stringsmall()

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

Returns

String

Sample
string.small();
split
Stringsplit(separator, limit)

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

Parameters

separator
limit

Returns

String

Sample
string.split(delimiter [,limitInteger]);
strike
Stringstrike()

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

Returns

String

Sample
string.strike();
sub
Stringsub()

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

Returns

String

Sample
string.sub();
substr
Stringsubstr(start, length)

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

Parameters

start
[length]

Returns

String

Sample
string.substr(start [,number of chars]);
substring
Stringsubstring(indexA, indexB)

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

Parameters

indexA
[indexB]

Returns

String

Sample
string.substring(start [,end]);
sup
Stringsup()

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

Returns

String

Sample
string.sup();
toLowerCase
StringtoLowerCase()

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

Returns

String

Sample
string.toLowerCase();
toUpperCase
StringtoUpperCase()

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

Returns

String

Sample
string.toUpperCase();

Visit our website at http://www.servoy.com or read our blogs at http://www.servoy.com/blog
Powered by Atlassian Confluence (w/ Adaptavist Theme Builder) | Terms of Use | Privacy Policy