Site Tools


remws

# $EPIC: remws.txt,v 1.2 2006/08/19 06:07:20 sthalik Exp $

Synopsis:

$remws(<lwords> / <rwords>)

Technical:

  • The first literal slash character found in the input acts as the separator between <lwords> and <rwords>. This means that <lwords> must not contain any slashes, but <rwords> may. If you do not put in a slash somewhere, the empty string is returned.
  • Any extra spaces between words in <rwords> will be removed.
  • The return value of this function will be all words in <rwords> that are NOT also in <lwords>.
  • This function can be quite expensive for large input strings.

Practical:

You would use this function if you needed to remove more than one word at a time from a word list. <rwords> is the word list, and <lwords> are the words you want to have removed from <rwords>. If you just want to remove one word, use $remw().

Returns:

<rwords> with <lwords> removed

Examples:

$remws(foo bar / test blah foo fnord bar nyah) returns "test blah fnord nyah"
remws.txt · Last modified: 2006/08/29 16:08 by 127.0.0.1