Lotus Software logo
IBM Lotus Domino Designer 8.5
Versions 8.5, 8.5.1, 8.5.2, and 8.5.3






substring (JavaScript)

Gets a substring.

Defined in

String (JavaScript)

Syntax

substring(start:int) : string

substring(start:int, end:int) : string

Parameters Description
start The beginning index, inclusive, where 0 is the first index in the string.
end The ending index, exclusive. Defaults to the rest of the string.
Return value Description
string The substring.

Examples

(1) The following example prints Moscow Tokyo (index 8 to the end).
var cities = new String("Paris   Moscow   Tokyo");
cities.substring(8)

(2) The following example prints Moscow (index 8 to index 14, exclusive) from the string.

var cities = new String("Paris   Moscow   Tokyo");
cities.substring(8, 14)



Library | Support | Terms of use |

Last updated: Tuesday, September 20, 2011