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

RE: st: RE: Help on double or single quote search in a String


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: Help on double or single quote search in a String
Date   Tue, 26 Oct 2004 17:43:52 +0100

Good advice, but all this works the same under Windows, 
fortunately. 

Nick 
n.j.cox@durham.ac.uk 

Tom Trikalinos
 
> Perhaps another way around is to use the _char()_  function
> . index(yourStringVariable, char(n))
> 
> In MacOsX at least:
> n=39 id the right single quote (')
> n=96 is the left quote (`)
> n=34 is the double quote (")
> 
> This is different in Windows.
> 
> To easily see what n corresponds to what character in your platform, 
> run the following in a do-file:
> forvalues i=1/255{
>     di "`i' for " char(`i')
> }
> 
> and pick the n you need.
> 

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