Difference between revisions of "Manual:DIL Manual/replace()"
Jump to navigation
Jump to search
(XML import) |
(No difference)
|
Latest revision as of 13:08, 27 May 2020
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%");