Other fun alternative mystring: "abcdef" reverse mystring remove mystring reverse mystring result: "abcde" If you define mystring: "aaaaaa" The last a is removed. It's sure. But nobody don't prove it. It works too. :-)) Luc Spirlet
Carl Read wrote: >On Tuesday, 14-December-2004 at 20:24:42 you wrote, > > > >>I've worked out two ways to chop-off the last character of a string. >> >>Method One >> >> >> >>>>mystring: "123456" >>>> >>>> >>== "123456" >> >> >>>>mystring: head remove back tail mystring >>>> >>>> >>== "12345" >> >> > >Note that REMOVE works directly on the string, so re-defining mystring and >HEAD isn't needed there... > > > >>>mystring: "123456" >>> >>> >== "123456" > > >>>remove back tail mystring >>> >>> >== "" > > >>>mystring >>> >>> >== "12345" > >And a fun alternative... > > > >>>mystring: "123456" >>> >>> >== "123456" > > >>>mystring: head reverse remove head reverse mystring >>> >>> >== "12345" > >:-) > >-- Carl Read. > > > > > -- To unsubscribe from the list, just send an email to rebol-request at rebol.com with unsubscribe as the subject.
