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   Tom Trikalinos <[email protected]>
To   [email protected]
Subject   Re: st: RE: Help on double or single quote search in a String
Date   Tue, 26 Oct 2004 20:00:56 +0300

False alarm then.
Seems that I share Kit Baum's preference for Macs too strongly.

For other characters, for greek characters in particular ( \delta , \Theta etc.) I think that there may be some differences.

Tom

On Oct 26, 2004, at 7:43 PM, Nick Cox wrote:


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

Nick
[email protected]

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/

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index