Identifying empty lines of text

J. Landman Gay jacque at hyperactivesw.com
Wed Jan 17 14:59:09 EST 2018


> On Jan 12, 2018, at 16:48 , David Epstein via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> I use “the number of words in myString = 0” to test whether a line of text appears empty, since I want a line with only space characters to be understood as empty.
> But a line of text I pasted from elsewhere contained an invisible character whose charToNum value is 202, and this was counted as a word by my script.
> Is there a better way to test for a line of text that has no visible characters?

Here's where the "trueword" keyword comes in handy:

    put the number of truewords in line x of fld y

It will ignore invisible and whitespace characters.


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com





More information about the use-livecode mailing list