Skip to content

Manual:DIL Manual replace()

iamnove edited this page Jan 18, 2023 · 51 revisions


Function:  string replace( t :string, n : string, o : string);
  t
         the target string you want to replace
  n
         what you want to replace the target with
  o
         the original string
  return
         the string with the old string replaced by the new string
This function replaces all occurences of a string in another string with a
new string.
Example:
"Jafar %t% %l%" := replace(%n%,pc.name,"%n% %t% %l%");
"Jafar the human %l%" := replace(%t%,pc.title,"Jafar %t% %l%");
"Jafar the human 1" := replace(%l%,itoa(pc.vlevel),"Jafar the human %l%");
Clone this wiki locally