User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

restw [2007/03/02 02:32] (current)
Line 1: Line 1:
 +# $EPIC: restw.txt,v 1.4 2007/03/02 02:32:04 jnelson Exp $
 +$__restw__(<​count>​ <word list>)
 +   * If the <​count>​ argument is omitted the empty string is returned.
 +   * This function returns the complement of $[[leftw]]();​ that is,
 +   * This function returns <word list> with the first <​count>​ words removed.
 +   * Remember that <word list> is a list of [[what is a word|words]].
 +This function is mostly useful when you know you want to always remove
 +the first few words from an input string, regardless of what they are,
 +and when there are a varying number of total arguments.
 +input list with given number of leading words removed
 +$restw(2 hello there how are you?)       ​returns "how are you?"
 +$restw(-1 hello there how are you?)      returns nothing
 +$restw(6 hello there how are you?)       ​returns nothing
 +This function first appeared in "​+2"​ (post-ircII,​ pre-EPIC)
restw.txt ยท Last modified: 2007/03/02 02:32 (external edit)