(substring: "growl", 3, 5) is the same as
You can obtain substrings of strings without this macro, by using the
of syntax along
with an Array of positions. For instance,
$str's (range:4,12) obtains a substring of $str containing
its 4th through 12th characters. But, for compatibility with previous Harlowe versions which did not
feature this syntax, this macro also exists.
If you provide negative numbers, they will be treated as being offset from the end
of the string -
-2 will specify the
2ndlast character, just as 2 will specify
If the last number given is smaller than the first (for instance, in
(substring: "hewed", 4, 2))
then the macro will still work - in that case returning “ewe” as if the numbers were in
the correct order.