How to test if a field does not contain anything else than returns or tab ?
J. Landman Gay
jacque at hyperactivesw.com
Tue Feb 3 13:49:25 CST 2009
DunbarX at aol.com wrote:
> This was a big thread on the HC list a few years back. Spaces are odd, in
> that they are not word delimiters. Although they are. One space between two word
> is two words, as is ten spaces between them. In HC:
> get the number of words of "a b c" --two spaces between the chars,
> returns 3
> And this....
> set the itemDelimiter to space
> get the number of items of "a b c" --returns 1
> Space is just a special kind of character, and it is hard to get the white,
> er, space.
> Does Rev have more powerful tools?
In Rev, using space as an itemdelimiter works as you'd expect:
set the itemDel to space
put the number of items in "a b c" -> 3
put the number of items in "a b c" -> 5
However, the "word" function will still only return the actual number of
put the number of words in "a b c" -> 3
which is generally what we want.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode