[REBOL] Re: removing a character with replace - was: RE: [REBOL]
From: anton:lexicon at: 7-Nov-2002 1:33
> >Actually, Louis probably wants this:
> > replace/all first x #"ÿ" ""
> Actually I first tried:
> replace/all "replace/all x "ÿ" ""
> but since it didn't work (because of the square brackets I overlooked), I
> tried searching for characters instead of strings.
> You did not mean to put "first" in your example, right?
I did mean it. That's in the case where, for example:
x: ["a string"]
We needed to modify the first element in the block.
>> replace first x "a" "abc"
== "abc string"
== ["abc string"]
> >replacing with an empty string, not an empty character.
> >An empty character is ascii 0:
> > >> to-integer #""
> > == 0
> >which you can see escape-coded in the string below:
> > "^@"
> Thanks for pointing this out; I certainly didn't know it.
Neither did I.