faster right trim
- Posted by jiri babor <jbabor at PARADISE.NET.NZ> Dec 14, 2000
- 321 views
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 >