See -help f_proper-
proper(s) returns a string with the first letter capitalized and
any other letters
immediately following characters that are not letters
capitalized, and all
other letters converted to lowercase.
proper("mR. joHn a. sMitH") = "Mr. John A. Smith"
proper("jack o'reilly") = "Jack O'Reilly"
proper("2-cent's worth") = "2-Cent'S Worth"
Scott
On Wed, Jun 4, 2008 at 11:11 AM, Andrea Bennett <[email protected]> wrote:
> Hi!
>
> I've successfully automated the process of renaming a variable's label.
> Unfortunately, it seems there is no string functions for "titlecase"
> (starting with a capital letter, then apply lowercase). Is there a solution
> to this?
>
> Many thanks for your considerations,
>
> Andrea
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/