Site Tools


strip
no way to compare when less than two revisions

Differences

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


strip [2007/03/02 02:32] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +# $EPIC: strip.txt,v 1.3 2007/03/02 02:32:04 jnelson Exp $
 +======Synopsis:======
 +$__strip__(<chars> <text>) \\
 +$__pass__(<chars> <text>)
 +
 +======Technical:======
 +   * The <chars> argument is a [[what is a word|dword]].  This is different than most functions.
 +   * If the <text> argument is omitted the empty string is returned.
 +   * The return value for $strip() is a copy of <text> from which every instance of any character in <chars> has been removed.
 +   * The return value for $pass() is a copy of <text> from which every instance of any character not in <chars> has been removed.
 +
 +======Practical:======
 +These functions can be useful to remove dangerous or unwanted
 +characters from a text string.
 +
 +======Returns:======
 +$strip(): <text> with all of the characters in <chars> removed. \\
 +$pass(): <text> with all of the characters not in <chars> removed.
 +
 +======Examples:======
 +<file>
 +$strip(aeoiu hello there)            returns "hll thr"
 +$pass(aeoiu hello there)             returns "eoee"
 +</file>
 +
 +======History:======
 +This function originally appeared in ircII-2.1.5
  
strip.txt · Last modified: 2007/03/02 02:32 by 127.0.0.1