Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: string function


From   "Lee Chuntao" <chtl@econ.hku.hk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: string function
Date   Thu, 10 Oct 2002 21:36:41 +0800

Hi, listers

     A piece of cake for you all but urgent for me. I wonder if there is
some function that can find how many times a character occured in a string,
i.e., suppose the function is string1(), so that,
     string1("abcd","a" )=1
     string1("abac","a" )=2
     string1("a/b/c","/" )=2
     string1("abcd","/" )=0

thanks in advance

Chuntao




*
*   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/



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