Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: strings


From   KOTa <kota.alba@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: strings
Date   Wed, 1 Feb 2012 13:05:14 +0100

Hi all,

i have 2 questions:

1.
i am using split command to divide my string variables into parts, is
there any way to force the split only by last occurrence of the split
sequence?

e.g. if strings are like "ABC BLINCAR COMPANY INC" and i want remove
the "INC" from all the strings. if i use split, p(INC) i will get "ABC
BL" instead of "ABC BLINCAR COMPANY".

2. is there any way to force stata to ignore letters case when
comparing strings?
e.g. if i merge 2 files by string variable i want that name "ROGER"
and name "Roger" would be recognized as the same string

thank you
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index