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

[REBOL] forming a string from a block but inserting a separation character Re:

From: joel:neely:fedex at: 28-Aug-2000 13:05

A function to do what you want (name inspired by plywood) is
>> ply: func [s [string!] b [block!] /local r t c] [
[ r: copy "" [ t: copy "" [ foreach c b [ [ repend r [t c] [ t: s [ ] [ r [ ]
>> ply "." [9 8 7 6 5 4 3 2 1]
== "9.8.7.6.5.4.3.2.1"
>>
This is a curious omission from REBOL, as it is the obvious inverse (or near-inverse, due to typing) of parse/all "9.8.7.6.5.4.3.2.1" "." -jn- [princepawn--lycos--com] wrote:
> s: [ 9 8 7 6 5 4 3 2 1 ] > > How do I create the string "9.8.7.6.5.4.3.2.1" from it? > > I thought that reform would have a /sepchar refinement, but it didnt. > > Get your FREE Email and Voicemail at Lycos Communications at > http://comm.lycos.com
-- ; Joel Neely [joel--neely--fedex--com] 901-263-4460 38017/HKA/9677 REBOL [] print to-string debase/64 decompress #{ 789C0BCE0BAB4A7176CA48CAB53448740FABF474F3720BCC B6F4F574CFC888342AC949CE74B50500E1710C0C24000000}