HTBasic Help
×
Menu
Index

Sub-string

 
A substring defines a portion of a string variable or string array element. It is selected by specifying a starting position within the string value and optionally, either the length of the sub-string, or the ending position within the string value. If only the starting position is specified, the rest of the string value from that point on is used for the sub-string. String positions are one-based, i.e., the first character of a string is in position one. The syntax is as follows:
         sub-string =
         '[' start-pos ']' |
         '[' start-pos, end-pos ']' |
         '[' start-pos; length ']'
Where:
start-pos and end-pos = numeric expression rounded to an integer in the
         range 1 to 32767.
length = numeric expression rounded to an integer
         in the range 0 to 32767.