Replace
This formula allows you to replace a particular substring occurrence inside another string with a given replacement.
Returns
string
JSON Format
{
"type": "replace",
"string": ...,
"occurrence": ...,
"replace": ...
}
RPG Script
This component can be written in RPG Script as:
replace(...)
Fields
| Field | Type | Required | Description |
|---|---|---|---|
string | StatFormulaComponent | ✓ | The formula for the string where the replacements should be made@type string |
occurrence | StatFormulaComponent | ✓ | The formula for the substring occurrence you want to replace. The Replace formula will replace all occurrences of this substring in the original string.@type string |
replace | StatFormulaComponent | ✓ | The formula for the string that the occurrences should be replaced for.@type string |