[EMAIL PROTECTED] 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?
A simple way, good for most purposes, but incorrect when the
elements contain spaces:
new-s: replace/all form s " " "."
A faster way, and correct when the elements contain spaces:
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 c