文字列内のサブストリングのすべてのオカレンスを新しいサブストリングで置き換えます。任意の引数が NoValue である場合、関数は NoValue を返します。
stringReplace ( str As Any, _ substr As Any, _ replstr As Any ) As Any
引数 | [タイプ] | 説明 |
---|---|---|
str | すべて | 検索対象の文字列です。 |
substr | すべて | 検索する文字のサブストリングです。 |
replstr | すべて | 置き換える文字のサブストリングです。 |
Intent >stringReplace("Three big dogs are chasing", "dog", "pig") --> "Three big pigs are chasing"
Intent >stringReplace("Two small cats", "dogs", "foxes") --> "Two small cats"サブストリングが見つからないため、置き換えは発生しませんでした。
Intent >stringReplace("Two small cats", NoValue, "foxes") --> NoValue