search for and replace the first occurrence of a string by another string
search for and replace all occurrences of a string by another string
Substitute( s, from, to )
SubstituteAll( s, from, to )
The Substitute(s, from, to) function replaces the first occurrence of the string from in the string s by the string to, and returns the resulting string. The original string s is not modified. Strings are immutable in Maple.
The SubstituteAll(s, from, to) function replaces all occurrences of from in s by to, and returns the resulting string. The original string s is not modified.
Only the first of overlapping occurrences of from in s is subject to replacement by to.
Download Help Document
What kind of issue would you like to report? (Optional)
Thank you for submitting feedback on this help document. Your feedback will be used
to improve Maple's help in the future.