Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: How to convert string into lower case except the first letter


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: How to convert string into lower case except the first letter
Date   Tue, 2 Feb 2010 13:42:50 -0500

Mike Kim <[email protected]>:
You may want to try
 gen cntry=proper(country)
and then fix any remaining issues one by one.

On Tue, Feb 2, 2010 at 1:39 PM, Mike Kim <[email protected]> wrote:
> Dear all,
>
> I would like to convert a string variable into lower case except the first
> letter. That is:
> from ARGENTINA to Argentina
> from BELGIUM to Belgium
> ....
>
> Using "lower" converts every letter into lower case: gen
> cntry=lower(country)
>
> country
> ARGENTINA
> BELGIUM
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index