Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: itrim a long local string in extended_fcn


From   Cyrus Levy <[email protected]>
To   statalist <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index