Performs a linear scan of buf from [0 .. buf.length$(RP), replacing occurrences of pat with val. Comparisons will be performed using the supplied predicate or '==' if none is supplied.
The array to scan.
The pattern to match.
The value to substitute.
The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type.
The number of elements replaced.
See Implementation
Performs a linear scan of buf from [0 .. buf.length$(RP), replacing occurrences of pat with val. Comparisons will be performed using the supplied predicate or '==' if none is supplied.