User Tools

Site Tools


count

Differences

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

Link to this comparison view

count [2007/03/02 02:32] (current)
Line 1: Line 1:
 +# $EPIC: count.txt,v 1.3 2007/03/02 02:32:04 jnelson Exp $
 +======Synopsis:​======
 +$count(<​string>​ <​text>​)
 +
 +======Technical:​======
 +The <​string>​ argument is a [[what is a word|dword]] which is unlike most
 +other functions.
 +
 +This function counts how many times <​string>​ appears in the text specified
 +by <​text>,​ possibly overlapping.
 +
 +======Practical:​======
 +The uses for a function like this are unlimited. ​ One may be to count how
 +many times a person'​s nick appears in a public message, for logging
 +purposes.
 +
 +======Returns:​======
 +number of times <​string>​ is found in <​text>​
 +
 +======Examples:​======
 +<​file>​
 +$count(. one.two.three) ​         returns 2
 +$count(zz zzzz)                  returns 3
 +</​file>​
 +
  
count.txt ยท Last modified: 2007/03/02 02:32 (external edit)