Command Line

Command SUBSTR

Function:

Extract a section of text from a text string. The extracted text string is stored in an environment variable called SUBSTR.
Syntax:
SUBSTR pos size [text]
posPosition to start extracting text from, where the first character is at position 1, the second character is at position 2 and so on.
sizeNumber of characters to extract.
textA sequence of characters.
Note:
  • Parameter pos can also be negative. The last character is at position -1, the second last character is -2 and so on.
  • Examples on using SUBSTR.
  • Also see command STRSPLIT, STRFIND, STRRFIND and Batch Programs.

Copyright © 1995-2005 Lucien Cinc, All Rights Reserved
WinOne is an Australian registered trademark of Lucien Cinc