REPLACE
REPLACE(<&subject>,<search>,[replace])
Type: Action
Category: Calculations
Permission: N/A
Since Minecraft Version: v1.4
Since Version: v0.9.4
Minor: 9
API: 5
Patch: 4
Description
Replace all occurrences of <search> with [replace] in <&subject>.
Returns the new string.
Example
&string = "Looking for Hello World"
// Deletes "for" from &string
REPLACE(&string,"for")
// Ouputs "Looking Hello World"
LOG(%&string%)
// Replaces "Hello" with the given string
REPLACE(&string,"Hello","Bye")
// Outputs "Looking Bye World"
LOG(%&string%)
// Doesn't modify &string
&result = REPLACE(&string,"World","Level")
// Outputs "Looking Bye Level" and "Looking Bye World" respectively
LOG(%&result%)
LOG(%&string%)
Changelog
- Added em v0.9.4: