proper function....

Apr 2, 2011
1,541
13
54
North Carolina, USA
With a lower[] and upper[] function already existing, adda a proper[] that would take care of McCarthy and similar.

McWhatever
MacWhatever

not sure what other examples would be....
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,568
97
Albuquerque, NM
prospero.unm.edu
I'm not sure that that can be handled by a simple algorithm. Recognizing names in context is not an easy task for a MacHine such as a MacIntosh.

(Names starting with Mc or O' might be easier.)
 
Apr 2, 2011
1,541
13
54
North Carolina, USA
Well - why not: %@UPPER[0,1,%@lower["THE GUY'S NAME IS SAMMY MCINTOSH"]] then check for special cases like "McIntosh" to see if it's a valid case.....
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,568
97
Albuquerque, NM
prospero.unm.edu
If I saw a way to do it without a dictionary, I'd write you a plugin.

But the request was for Rex, anyway. And we all know he's MacGyver. No doubt he can whip up a simple MacRo.

Charles
 
Nov 2, 2008
243
2
If you are going to do Mac and O' and other joint names, you would need a special char to indicate wordbreak with no space.
 

Similar threads