I have a stack with 2 fields: the first one "fRAW" contains my uncapitalised sentence,
the second one, "fCOOKED" is where the capitalised sentences ends up.

I have a button called "SORT THINGS OUT" with this script:

on mouseUp
   put empty into fld "fCOOKED"
   put fld "fRAW" into cRAW
   put 1 into KOUNT
repeat until cRAW is empty
      put word 1 of cRAW into rWORD
  put toUpper (char 1 of rWORD) into cC
      delete char 1 of rWORD
      put (cC & rWORD) into cWORD
      delete word 1 of cRAW
      put cWORD & numToCodePoint(32)after fld "fCOOKED"
      add 1 to KOUNT
   end repeat
end mouseUp

Richmond.


On 21/4/2018 6:35 am, Sannyasin Brahmanathaswami via use-livecode wrote:
What to the simplest way to  "sentence case"

a create a sentence title

in use toUpper to convert to

A Create A Sentence Titleā€¦

BR
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to