This shows you the differences between two versions of the page.
— |
rest [2006/08/29 16:08] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | # $EPIC: rest.txt,v 1.2 2006/08/19 06:07:20 sthalik Exp $ | ||
+ | ======Synopsis:====== | ||
+ | $__rest__(<text>) \\ | ||
+ | $__rest__(<num> <text>) | ||
+ | |||
+ | ======Technical:====== | ||
+ | * If the <num> argument is not provided, 1 is the default value. | ||
+ | * The return value is <text> with the first <num>th characters removed. | ||
+ | * If you think that the first word in <text> may be a number, better to be safe than sorry; specify an explicit "1" for <num>. | ||
+ | |||
+ | ======Practical:====== | ||
+ | This can be used to remove the initial character of a string, or to remove | ||
+ | multiple initial characters from a string. | ||
+ | |||
+ | ======Returns:====== | ||
+ | <text> with the first <num> characters removed. | ||
+ | |||
+ | ======Examples:====== | ||
+ | <file> | ||
+ | $rest(4 foobarfnord) returns "arfnord" | ||
+ | $rest(foobarfnord) returns "oobarfnord" | ||
+ | $rest(1 5 testing) returns " testing" | ||
+ | </file> | ||