Title Text

Alex Adams alex at a2technology.com
Wed Oct 27 12:44:05 EDT 2010


Awesome response guys.  3 responses in less than 10 minutes.  Now that's
support.

Got just what I need.

Thanks,
-- 
Alex Adams

hawkVision ‹ see the elephant for what it is
A2 Technology Partners, Inc.
831-724-1397
alex at a2technology.com
www.a2technology.com


> From: Devin Asay <devin_asay at byu.edu>
> Reply-To: How to use Revolution <use-revolution at lists.runrev.com>
> Date: Wed, 27 Oct 2010 10:34:51 -0600
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Subject: Re: Title Text
> 
> 
> On Oct 27, 2010, at 10:21 AM, Alex Adams wrote:
> 
>> Is there a function that I can use to convert a string to title text (the
>> first letter of each word is capitalized)?  I can¹t find one in the
>> dictionary.  I could write a handler I suppose, but I¹m hoping there is
>> something already available.
> 
> Alex,
> 
> Here's a really basic one I have used. It actually let's you choose between
> sentence case and title case with an optional argument. But there is no
> checking for words that shouldn't be capitalized according to English
> capitalization rules, such as prepositions. But it's a start.
> 
> function capitalize string,allWds
>     if allWds is true then
>         put number of words in string into limit
>     else 
>         put 1 into limit
>     end if
>     repeat with i = 1 to limit
>         put toUpper(char 1 of word i of string) into char 1 of word i of
> string
>     end repeat
>     return string
> end capitalize
> 
> Regards,
> 
> Devin
> 
> 
> Devin Asay
> Humanities Technology and Research Support Center
> Brigham Young University
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list