User Tools

Site Tools


rest

# $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:

$rest(4 foobarfnord)  returns "arfnord"
$rest(foobarfnord)    returns "oobarfnord"
$rest(1 5 testing)    returns " testing"
rest.txt · Last modified: 2006/08/29 16:08 (external edit)