1. faster right trim
- Posted by jiri babor <jbabor at PARADISE.NET.NZ> Dec 14, 2000
- 318 views
- Last edited Dec 15, 2000
This one is simpler & faster than previous one: function rtrim(sequence s) -- discard trailing whitespace of sequence s for i = length(s) to 1 by -1 do if not find(s[i], {9,10,13,32}) then return s[1..i] end if end for return {} end function jiri ----- Original Message ----- From: "Brian" <impee3 at EXCITE.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Thursday, December 14, 2000 5:32 PM Subject: Whitespaces > What's the easiest way to get rid of whitespaces at the end of a string of > text? > > Thanks, > Brian >
2. Re: faster right trim
- Posted by Euman <euman at BELLSOUTH.NET> Dec 14, 2000
- 331 views
Ole Jiri has got lots of goodies buried somewhere.... euman at bellsouth.net ----- Original Message ----- From: John <jwr6dmr at CS.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Thursday, December 14, 2000 9:53 AM Subject: Re: faster right trim > function rtrim(sequence s) -- discard trailing whitespace of sequence s > > for i = length(s) to 1 by -1 do > if not find(s[i], {9,10,13,32}) then return s[1..i] end if end > for > return {}end function > > Thats good.. every once in a while you see some little gem and you just gota > paste it to your tools/file.. >
3. Re: faster right trim
- Posted by John <jwr6dmr at CS.COM> Dec 14, 2000
- 324 views
function rtrim(sequence s) -- discard trailing whitespace of sequence s for i = length(s) to 1 by -1 do if not find(s[i], {9,10,13,32}) then return s[1..i] end if end for return {}end function Thats good.. every once in a while you see some little gem and you just gota paste it to your tools/file..