SLUDGE

substring


Syntax:

substring (thisString, start, numCharacters);

Purpose:

Makes a new string, containing 0 or more characters from the string thisString. The new string will start with the character at position start and be numCharacters long. Note that the value of start is zero-based... the first character in the string is character 0, the second is character 1 and so on.

Return value:

The function returns the new string.

Example:

var a = substring ("123456789", 2, 5);
# a now contains the string "34567"

var b = "Oi! SLUDGE is great!";
var c = substring (b, 4, stringLength (b) - 4);
# c now contains the string "SLUDGE is great!"

See also:

stringLength