User Tools

Site Tools



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

Link to this comparison view

matchitem [2007/02/27 04:57]
matchitem [2007/02/27 04:57] (current)
Line 1: Line 1:
 +# $EPIC: matchitem.txt,​v 1.3 2007/02/27 04:57:37 jnelson Exp $
 +$__matchitem__(<​array>​ <​pattern>​)
 +This function treats the items in the array as literal strings, and 
 +returns the literal string that is "best matched"​ by the pattern.
 +The item value of the best matched string is returned.
 +This string is similar to the [[rmatch]] function, and the reverse of
 +the [[rmatchitem]] function.
 +These functions are analogous to $[[match]]() and $[[rmatch]](). ​ Given a word
 +or pattern, they search through the given array'​s contents and look
 +for the best match, if any.  Basically, the array'​s contents behave as
 +if they were the list of words or patterns passed to $[[match]]() or
 +> -1   item number in array that matched
 +  -1   could not find specified array
 +  -2   could not find a matching item
matchitem.txt ยท Last modified: 2007/02/27 04:57 (external edit)