共用方式為


Text.Replace

語法

Text.Replace(text as nullable text, old as text, new as text) as nullable text

關於

傳回以文字值 new 來取代文字值 text 中所有出現的文字值 old 結果。 這個函式會區分大小寫。

範例 1

以 "a" 取代句子中出現的每一個 "the"。

使用方式

Text.Replace("the quick brown fox jumps over the lazy dog", "the", "a")

輸出

"a quick brown fox jumps over a lazy dog"