Title Case

Alex Tweedly alex at tweedly.net
Sat Apr 21 07:25:57 EDT 2018


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 at 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 at 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the Use-livecode mailing list