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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: itrim a long local string in extended_fcn


From   Cyrus Levy <levy.cyrus@gmail.com>
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   st: itrim a long local string in extended_fcn
Date   Wed, 13 Mar 2013 18:42:38 -0400

How can I -itrim- a long local string without getting the string
abbreviated because of its length? The example below doesn't work. Is
there an easy one line solution like a macro extended function such as
-:subinstr local- to get the -itrim-ed version of a long local string?
Any help is appreciated.

. local text = itrim("    qqqqqqqqqqqqqqqqqqqqqqqqqqq
wwwwwwwwwwwwwwwwwwwwwwwwwwwwww
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
             ttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
       yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu   ")

. display "`text'" "..."

qqqqqqqqqqqqqqqqqqqqqqqqqqq wwwwwwwwwwwwwwwwwwwwwwwwwwwwww
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
ttttttttttttttttttttttttttttttttt...
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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