Returns a new string which results of replacing all the appearances of oldChar in this string with newChar.
1 string.replace
<string.replace>
<text /> !
<old_word /> !
<new_word /> !
</string.replace>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Etext | string | Text in which the search is performed. | |||
Eold_word | string | String to search for. | |||
Enew_word | string | Replacement string value. |
Returns | |
---|---|
Type | Description |
string | A string derived of this string through the substitution off all the appearances of oldChar with newChar. |
Exceptions
requires 3 arguments, received: ...
The 3 entry parameters has not been specified.
Example
Copy
<xsql-script name='string_replace_sample1'> <body> <set name='text'>This is a prueba text of change.</set> <set name='old_word'>prueba</set> <set name='new_word'>test</set> <println> <string.replace> <text/> <old_word/> <new_word/> </string.replace> </println> </body> </xsql-script>
Returns:
Copy
This is a test text of change.