SETMID Extract mid substring |
Top Previous Next |
This script command extracts [ cnt ] characters from within [ value ] beginning with character number [ at ] and saves the result in [ variable ].
Consider the following example.
;; assign a variable to a string SET string = "this is a string" ;; extract 2 characters from mid-string starting at character #6 SETMID substring = string 2 6
;; another example of syntax to extract 2 characters from mid-string starting at character #6 SETNUM len = 2 SETNUM startat = 6 SETMID substring = string len startat
The resulting substring variable contains the value "is".
Related Command(s): SET, SETEXTRACT, SETRIGHT, SETLEFT, SETSUBSTR
|