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
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
|