Processes bytes as they pass through a buffer and replaces sequences in it.

package Swift
author Chris Corbyn

 Methods

Create a new StringReplacementFilter with $search and $replace.

__construct(string | array $search, string | array $replace) 

Parameters

$search

stringarray

$replace

stringarray

Perform the actual replacements on $buffer and return the result.

filter(string $buffer) : string

Parameters

$buffer

string

Returns

string

Returns true if based on the buffer passed more bytes should be buffered.

shouldBuffer(string $buffer) : boolean

Parameters

$buffer

string

Returns

boolean

 Properties

 

$_replace