Words()

From TinyMUX
Jump to navigation Jump to search


words(<string>[, <delim>])

Returns the number of words in <string>. <delim> may be used to specify a delimiter other than a space.

Example

> say words(This is a test)

You say, "4"

say words(Would you like coffee or perhaps tea?)

> You say, "7"

say words(This:is:a:colon:separated:list,:)

> You say, "6"