Zoomed Image

AMSX Scripting Language - Command : Substring

Summary

Extract a substring from a string

Description

Returns a portion of a string starting at a given position. The start index is 1-based (not zero-based). If length is omitted, the remainder of the string is returned.

Parameters

ParameterDescription
cmdSource string
Argument 0Start index (1-based)
Argument 1Length of substring (leave blank to return the rest of the string)

Syntax


Substring "Source string", "Start index (1-based)", "Length of substring (leave blank to return the rest of the string)"

Return to the AMSX Command Reference