Please enable JavaScript to view this site.

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

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC