@SUBSTR

Print Topic  Return to Overview  Previous Topic  Next Topic 

@SUBSTR[string,start,length] :  An older version of @INSTR. If the length is omitted, it will default to the remainder of string. If string includes commas, it must be quoted with double quotes ["] or back-quotes [`], or each comma must be preceded by an Escape character The quotes count in calculating the position of the substring. @INSTR, which has string as its last parameter, does not have this restriction.

 

Numeric input may be entered in either decimal format (series of digits 0-9) or in hexadecimal format ("0x" followed by a sequence of 0-F hex digits).

 

Examples:

 

echo %@substr[this is useful,8]

echo %@substr[this is useful,8,-2]

echo %@substr["commas, they DO matter",9]

echo %@substr[commas^, they DO matter,9]

 

See also: @INSTR.

Topic "f_substr.htm" last edited 5/13/2008. ©2008  JP Software, Inc.
Keywords: @SUBSTR,@INSTR