Or maybe

put toupper(char 1 of tolower( trueword i of tTitle) ) into trueword i of tTitle

or

put toupper(char 1 of trueword i of tTitle) & \
    tolower(char 2 to -1 of trueword i of tTitle) into trueword i of tTitle


-- Alex.


On 21/04/2018 04:54, Mike Bonner via use-livecode wrote:
Something like this might work..

put "a create a sentence title" into tTitle
repeat with i = 1 to the number of truewords in tTitle
    put toupper(char 1 of trueword i of tTitle) into char 1 of trueword i of
tTitle
end repeat
put tTitle -- the adjusted case sentence

If you have words that you would rather not uppercase of course, you'll
have to check for those. (like of, the...) and whether or not the word is
the first.


On Fri, Apr 20, 2018 at 9:35 PM, Sannyasin Brahmanathaswami via
use-livecode <use-livecode@lists.runrev.com> 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


_______________________________________________
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