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

[REBOL] Re: Newbie Q: Cropping text

From: g:santilli:tiscalinet:it at: 4-Jul-2002 12:48

Hi Charles, On Thursday, July 04, 2002, 7:02:50 AM, you wrote: C> series! with next and skip and tail and so forth. A pointer to a list element C> which I cannot see irritates me. Ok, so you need: right: func [series [series!] elements [integer!]] [ copy skip tail series negate elements ] left: func [series [series!] elements [integer!]] [ copy/part series elements ] mid: func [series [series!] start [integer!] length [integer!]] [ copy/part at series start length ]
>> right "abcdefg" 3
== "efg"
>> left "abcdefg" 3
== "abc"
>> mid "abcdefg" 3 3
== "cde" Adapt REBOL to you, not the opposite. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r