Date: Mon, 7 Feb 2011 13:24:26 -0600
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: Strip Function And Leading and Trailing Tab Chars
In-Reply-To: <BLU152-w270AB0DEFE4FF4F33CBA25DEEB0@phx.gbl>
Content-Type: text/plain; charset=ISO-8859-1
Perhaps the function's documentation should be more specific. I believe it
works ONLY with '20'x, and not even with 'A0' (nonbreaking space), not to
mention '09'x, etc.
I think it would be problematic for it to include '09'x as, while users
might not be aware they have tabs in their data, reading a tab-delimited
string you might have real problems with strip removing tabs...
Personally I'd rather we just stopped using Tab for anything, as that would
solve all sorts of problems. But what can you do... Tabs are not shorthand
for 4 blanks, they're shorthand for [n] blanks, which varies from program to
program (and in the case of a width-sensitive font, are often shorthand for
0.5in width or something else].
Users should use Edit+ or Notepad+ or Textpad or wahtever and turn on
visible spaces/tabs... then they can easily see what's in the data :)
-Joe
On Mon, Feb 7, 2011 at 1:18 PM, toby dunn <tobydunn@hotmail.com> wrote:
> I was thinking of the Strip function.
>
> What is a blank?
> Is it a hex value of '20'x
> or
> can it also be a '09'x which is what a short hand for 4 blanks
>
> For the most part users don't dump hex values out to check for
> tabs or control characters. Which means at least to me that
> it should strip what people think when they say leading
> and trailing blanks. In other words either make the online docs
> specific or think in terms of the user and make the functionality
> fit that.
>
> Maybe Im just grumpy this morning but this half way functionality
> just rubs me wrong.
>
> Toby Dunn
>
>
> "I'm a hell bent 100% Texan til I die"
>
> "Don't touch my Willie, I don't know you that well"
>
>
>
>
> > Date: Mon, 7 Feb 2011 13:14:06 -0600
> > Subject: Re: Strip Function And Leading and Trailing Tab Chars
> > From: iebupdte@gmail.com
> > To: tobydunn@hotmail.com
> > CC: SAS-L@listserv.uga.edu
> >
> > I don't see any mention of any characters but blanks in the
> > documentation for STRIP. You may be thinking of COMPRESS that
> > includes the modifier
> >
> > s or S
> >
> > adds space characters (blank, horizontal tab, vertical tab, carriage
> > return, line feed, and form feed) to the list of characters.
> >
> > On Mon, Feb 7, 2011 at 12:15 PM, toby dunn <tobydunn@hotmail.com> wrote:
> > >
> > > I found this little oddity this morning.
> > >
> > > Seems the Strip function which is suppose to strip out all leading and
> trailing
> > > white space characters fails to get rid of tab characters.
> > >
> > > 6145 Data _Null_ ;
> > > 6146 Text = Cats( '09'x , 'text here' , '09'x ) ;
> > > 6147 Put Text= Hex26. ;
> > > 6148 Text = Strip( Text ) ;
> > > 6149 Put Text= Hex26. ;
> > > 6150 Run ;
> > > Text=09746578742068657265092020
> > > Text=09746578742068657265092020
> > >
> > > I am not sure what other white space characters it will not strip out,
> just saying it
> > > ain't catching these.
> > >
> > >
> > >
> > > Toby Dunn
> > >
> > >
> > > "I'm a hell bent 100% Texan til I die"
> > >
> > > "Don't touch my Willie, I don't know you that well"
> > >
> > >
> > >
>
>
|