[DGD] Reasonable Tick Counts?
Petter Nyström
jimorie at gmail.com
Sun Jul 8 23:30:00 CEST 2007
That's an excellent implementation of search and replace functionaly,
I agree. But as I understood the scenario, Kurt here had a bunch of
different codes to replace with actual ansi escapes. Rather than doing
a search and replace for each of these codes, it surely must be faster
to implement a parser that finds and replaces all codes in one pass.
Regards,
Jimorie
On 7/8/07, Shentino <shentino at gmail.com> wrote:
> Fastest way I know of to do a "replace"
>
> temp = oldstuff + explode(input, oldstuff) + oldstuff
> output = implode(temp, newstuff)
>
> It's Noah's "Crazy uncle bear" approach, but it works. I use it all
> the time myself to escape (and unescape) raw strings so that they can
> be LPC neutral (without funny escapes doing stuff). This is how I can
> output and input strings without worrying about special characters.
> ___________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd
>
More information about the DGD
mailing list