ReplaceAll()

From ElectronicWar

Jump to: navigation, search
Function information for replaceAll()
Function replaceAll()
Parameters (string s1,string s2,string s3)
API All
Cost $0
Level N/A
CPU Usage 0
Description Replaces all instances of s2 in s1 with s3..


[edit] Example

lineStr = "This a story about a man named Bob. Bob was a man."
replacedStr = replaceAll(lineStr, "Bob", "Alice");
replacedStr2 =  replaceAll(lineStr, "man", "woman");
 Output: replacedStr = "This a story about a man named Alice. Alice was a man."
 Output: replacedStr2 =  "This a story about a woman named Alice. Alice was a woman."
Personal tools