Quick Challenge

David Bovill david at viral.academy
Thu Aug 27 10:39:36 EDT 2015


So what's the quickest way to tell is a word is all caps in Livecode? I
guess there are a lot of ways to skin a cat with this one. This is what I'm
tinkering with:

function text_IsCaps someText
>    put "\b[A-Z]+\b" into someReg
>    return matchtext (word 1 to -1 of someText, someReg, anyThing)
>
>    repeat for each char testChar in someText
>       put chartonum (testChar) into someCharNum
>       if someCharNum >= 65 and someCharNum <= 90 then
>          return false
>       end if
>    end repeat
>    return true
> end text_IsCaps



More information about the Use-livecode mailing list