Function __global->override_str_replace_exactly
Definitions
sources/global.php
- Replace a limited number of occurrences of the search string with the replacement string.If there are the wrong number of occurrences (including zero) an error is put out, as this indicates an override is broken.The phrase "<ditto>" will repeat the original $search string back into $replace.
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: N/A
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$search | mixed | required parameter | N/A | N/A | What's being replaced (string or array) |
$replace | mixed | required parameter | N/A | N/A | What's being replaced with (string or array) |
$subject | mixed | required parameter | N/A | N/A | Subject (string or array) |
$times | integer | 1 | N/A | N/A | Number of times to replace (to expect to replace) |
$fail_ok | boolean | False | N/A | N/A | Whether a failure should attach a message and return the original code (false: a failure should cause a critical error) |
Return
- Result (string or array)
- Type: mixed
- Set: N/A
- Range: N/A