Phil wrote:
> Is there a built Rebol function that does the equivalent of Java's
> substring?? (ie make a string from part of another string) Or do I have to
write my own function to do this.
>
> Had a look through the draft manual for 2.2 but I cant see anything there.

Have a look at 'copy, in particular, the '/part refinement.

>> help copy
Returns a copy of a value.
Arguments:
    value -- Usually a series (series port bitset)
Refinements:
    /part -- Limits to a given length or position.
        range --  (number series port)
    /deep -- Also copies series values within the block.
>> s: "abcdefghijklmnop"
== "abcdefghijklmnop"
>> t: copy/part s 5
== "abcde"
>> s
== "abcdefghijklmnop"
>> t
== "abcde"
>> s: 12
== 12
>> t
== "abcde"

I hope that helps!

Andrew Martin
The Amazing Andrew and his $20 Java Book!
ICQ: 26227169
[EMAIL PROTECTED]
http://members.xoom.com/AndrewMartin/
-><-

Reply via email to