MagGem: Capitalize The Right Way
Posted February 22 2011
As Mike Hanson pointed out a couple of years ago in Formatting Names Using Proper Case, Clarion's text capitalization is rudimentary at best. The CAP attribute arbitrarily forces the first letter of each word to uppercase, which isn't always what you want. Type john smith and CAP gives you John Smith, but john smith md becomes John Smith Md, von richtoven becomes Von Richtoven (the 'von' should remain lowercase), and mcdowell becomes Mcdowell rather than McDowell.
While there are some rules that can be applied to this problem, there are also many special cases. Happily, Mike has written a class that applies both rules and exceptions to the problem of capitalization, so if his code doesn't cover some situation you can easily rectify that with a method call or two.
Watch the MagGem in ClarionLive Webinar #97
Article comments
Search ClarionMag
From the archives
Making Sense of ABC's ErrorClass - Part 1
11/21/2000 12:00:00 PM
If there's one part of ABC that consistently draws fire, it's ErrorClass. In this three part series, Russ Eggen puts on his flak jacket and steps out into no man's land to explain what ErrorClass is all about, why it's good, and what you can do with it.
