Hi Doc,

> (I usually do not use 'replace mezzanine in my code unless i don't care
about
> speed)

Time to try to speed up replace?

This is my first try (+ 100% in my system) . Anything better?

(I'm using more and more parse and i usually reach more fast loop (+50% -
+100%),
more compact and more readable code.)

replace: func [
    {Replaces the search value with the replace value within the target
series. Changed by ana}
    target [series!] "Series that is being modified."
    search "Value to be replaced."
    replace "Value to replace with."
    /all "Replace all occurrences."
    /case "Case-sensitive replacement."
    /local start end rule
][
    rule: [to search start: search end: opt (end: change/part start replace
end) :end]
    if all [any-string? target any [not any-string? :search tag? :search]]
[search: form :search]
    if all [rule: reduce ['some rule]]
    either case [parse/all/case target rule][parse/all target rule]
    target
]

---
Ciao
Romano


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to