SubString

From Catglobe Wiki
Revision as of 09:49, 7 March 2011 by 127.0.0.1 (talk | contribs) (jrfconvert import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



subString

Retrieves a substring from a source string. The substring starts at a specified character position or at the beginning of the string and has a specified length.

Syntax

subString(source, start)

or

subString(source, start, length)

Arguments

string_exp: Is a string expression.

start: Is a number expression. This is the start character position.

length: Is a number expression. This is the length of the substring.

Return type

string

Examples

print(subString("Hello", 4));

//o

print(subString("Hello", 0, 4));

//Hell

Availability

Version 5.1