User Tools

Site Tools


numwords

Differences

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

Link to this comparison view

numwords [2006/08/01 20:54] (current)
Line 1: Line 1:
 +# $EPIC: numwords.txt,​v 1.2 2006/08/01 05:32:26 sthalik Exp $
 +======Synopsis:​======
 +$__numwords__(<​word list>)
 +
 +======Technical:​======
 +This function serves as a replacement for the $#var notation when you
 +want to count the words in a string not held in a variable.
 +
 +======Practical:​======
 +This function is used to count the number of words in an arbitrary
 +string. ​ Normally, you could get this value with the $#var form, but
 +that doesn'​t work for parameter expandos or function return values.
 +
 +======Returns:​======
 +number of words in given string
 +
 +======Examples:​======
 +<​file>​
 +$numwords(hello there bob)                returns 3
 +$numwords() ​                              ​returns 0
 +</​file>​
  
numwords.txt ยท Last modified: 2006/08/01 20:54 (external edit)