# Replace - スクリプトおよびチャート関数

Replace() は、指定された文字列内に含まれる指定されたサブストリングすべてを別のサブストリングで置き換えた文字列を返します。この関数は非再帰関数で、左から右へ処理されます。

構文:

Replace(text, from\_str, to\_str)

戻り値データ型： 文字列

引数：

Replace 引数

| 引数 | 説明 |
| --- | --- |
| text | 元の文字列。 |
| from\_str | text 入力文字列に 1 回以上現れる文字列。 |
| to\_str | text 文字列に現れる from\_str をすべて置き換える文字列。 |

例と結果:

例と結果

| 例 | 結果 |
| --- | --- |
| `Replace('abccde','cc','xyz')` | 'abxyzde' を返します |