LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (May 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 2 May 2006 13:42:18 -0700
Reply-To:     "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:      Re: is there an easy way to trim blanks on the left side of a
Comments: To: lzhang9830@YAHOO.COM
Content-Type: text/plain; charset="us-ascii"

The length function returns the last nonblank position. This with substr, subpad, or substrn is what you need.

Substr(var,1,Length(var))

Paul Choate DDS Data Extraction (916) 654-2160

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Lei > Zhang > Sent: Tuesday, May 02, 2006 1:34 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: is there an easy way to trim blanks on the left side of a > > Harry, > Sorry, I didn't presnent my problem correctly. > I actually am looking for a simple method to trim the blanks on > the RIGHTside of a SAS string, not left side. There are two > conditions: > First. Excepting the trailing balnks, the positions of other > characters should not chnaged, and > Second, the blanks (if any) on the left sides should not be removed > . > > I guess SAS should provide a Base function called RTRIM(), but I > simply can not find it. > > Lei


Back to: Top of message | Previous page | Main SAS-L page