Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove a string at the end of a string
#1
I wonder whether there exists a QM function to remove a certain string (right trim a string) at the end of a string.

I have written the following member function. Any advice is mostly welcome.

Member function str.RStrim
Code:
Copy      Help
function str'sRtrim
str s=this
int l=s.len-sRtrim.len
_i=find(s sRtrim l)
if _i<0; ret
s.remove(_i)
this=s
ret


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)