repalce(old,new,max)

参数:
old:将被替换掉的字符
new:新字符串,拥有替换old字符串
max:替换次数不超过max次,可选参数

str = "this is string example....wow!!! this is really string";
print str.replace("is", "was");
print str.replace("is", "was", 3);

>>thwas was string example....wow!!! thwas was really string
>>thwas was string example....wow!!! thwas is really string