replace()
サブ文字列を、指定された文字に置換します。
構文
replace(string、searchStr、replaceStr)
使用方法
この関数は、searchStr を replaceStr に置換してから、変更した文字列を返します。いずれかのパラメータが null の場合、関数は null を返します。searchStr が空文字列の場合、この関数は null を返します。この関数では、大文字と小文字が区別されます。
例
1replace("Watson, come quickly.", "quickly", "slowly") == "Watson, come slowly."
2replace("Watson, come quickly.", "o", "a") == "Watsan, came quickly."
3replace("Watson, come quickly.", "", "Mr.") == null