Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: remove character from end of line if character exists?

From: carl::cybercraft::co::nz at: 24-Dec-2003 22:23

On 16-Jul-03, bryan wrote:
> I'm doing the following: > parsestring-length: length? parsestring > tempstring: at parsestring parsestring-length > if find tempstring "/" [ > reverse parsestring > remove parsestring > reverse parsestring > ] > this seems really inelegant. Anyone have a good solution?
This do what you want? ... if "/" = tempstring: back tail parsestring [remove tempstring] Hmmm - or even better... remove find back tail parsestring "/" Warning: Not extensively tested... -- Carl Read