Function that performs, within a string, substitution of one substring (if found) for another specified substring.
Syntax |
i32 str_replace (string strSrc, string strOld, string strNew) |
---|---|
strSrc |
String variable on which the function works |
strOld |
Substring to search on |
strNew |
Substring to replace |
Result |
Returns the index within strSrc of the first character where the substitution occurred. If the substring begins with the first character it returns 1, if it does not exist it returns 0 and makes no substitution |
Validity |
Rule, Task |
Note |
The search takes the difference between uppercase and lowercase characters |
Example of use:
|