Title Case

Bob Sneidar bobsneidar at iotecdigital.com
Mon Apr 23 11:20:20 EDT 2018


What I do is I have a "force" flag where you can specify whether or not you want to force olny the first letter to be capitalized and the rest lowercase, or else capitilize the first letter of each word and leave the rest as it is. Therefore titleCase("mcReary", false) will produce "McReary". But my function is a validation for user input, not for converting lists of titles to proper case. 

I suppose it wouldn't be hard to compile every known compound name prefix (Mc, Mac, O' etc)

Bob S


> On Apr 21, 2018, at 07:41 , Mike Bonner via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Not sure what you mean?
> Also, definitely use one of the Andy versions to "case" your titles.  Much
> more comprehensive solution.  The only edge case I can see would be
> something like a title with a McGary type name, pretty much impossible to
> account for without looking up every word in a names DB.





More information about the Use-livecode mailing list