Hello!

	I have a proposal ;) Not sure eveyone will need it - maybe everyone is
satisfied with regexp matching performance, but sometimes I need a lot of
string replacements which work fast, and do NOT need complex regexp matching
rules. I'm pretty sure that regexp matching isn't the fastest operation out
there (at least I believe it involves some kind of regexp compilation). So,
I'm proposing the following two methods (to be built in C).

class String
    def subst(string, new)
        copy, ptr, len = dup, 0, string.length
        copy[ptr, len] = new while ptr = (copy.index string, ptr + len)
        copy
    end

    def subst!(string, new)
        ptr, len, modify = 0, string.length, false
        self[ptr, len] = new and modify = true while ptr = (index string,
ptr + len)
        modify
    end
end

	I think this ruby implementation will help you to understand my needs. I
know that 'my needs' does not sound good ;), but I'd like you to vote on
this topic :)

P.S. I know that presented implementation isn't even close to be effective
even from algorithm view (at least a Boyer-Moore or Knuth-
Morris-Pratt algorithm maybe applied), and may contain bugs, but I provide
it only as a reference.

Aristarkh A Zagorodnikov, Lead Programmer, W3D Group
http://www.w3d.ru /// xm / w3d.ru /// ICQ UIN 36987938