Difference between revisions of "ReplaceAll Command"
From GeoGebra Manual
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=5.0}}</noinclude> {{command|text}} | <noinclude>{{Manual Page|version=5.0}}</noinclude> {{command|text}} | ||
;ReplaceAll( <Text>, <Text to Match>, <Text to Replace> ) | ;ReplaceAll( <Text>, <Text to Match>, <Text to Replace> ) | ||
− | :Replaces text. | + | :Replaces the given ''text to match'' in a text string with the given ''text to replace''. |
:{{Example|1=<code>ReplaceAll("3cos(t)+cos(2y)", "cos", "sin")</code> gives <code>"3sin(t)+sin(2y)"</code>.}} | :{{Example|1=<code>ReplaceAll("3cos(t)+cos(2y)", "cos", "sin")</code> gives <code>"3sin(t)+sin(2y)"</code>.}} |
Revision as of 11:05, 10 December 2020
- ReplaceAll( <Text>, <Text to Match>, <Text to Replace> )
- Replaces the given text to match in a text string with the given text to replace.
- Example:
ReplaceAll("3cos(t)+cos(2y)", "cos", "sin")
gives"3sin(t)+sin(2y)"
.