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]

Re: st: Another question regarding string variables


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Another question regarding string variables
Date   Thu, 28 Feb 2013 08:20:05 +0000

Yes. For example

replace fullname = substr(fullname, 1, length(fullname) - 2) if
substr(fullname, -2, 1) == "  "

Nick

On Thu, Feb 28, 2013 at 6:41 AM, Dudekula, Anwar <[email protected]> wrote:

> Is it possible to trim last word if it is one alphabet wide like removing. A from   ( Graham , Tony   A )
*
*   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