A substring starting at the given position and having up to count elements.
TargetString | String to get substring from. |
Position | Index the substring starts at. |
Count | Optional. Maximum number of characters to get. By default it will get the rest of the string. |
Note that this command is based on string range
. If the position and count given are such that it goes past the end of the string then it will return as much as it can rather than throw an error.
For information regarding exceptions / errors, see
here.
% StringMid "aaabbb" 3 2
bb
% StringMid "one two three" 7
three