This function searches in text a for the search text b. The search goes from right to left, starting at the start index c. All indexes start at 1 (viewed from the left).
The function returns the index of the last occurrence (viewed from the left) of the search text b. If b is not found, the return value is 0. See examples.
Parameters
Parameter | Description |
|---|---|
a | Text. |
b | Search text. |
c | (optional) Start index of the search. Default: 0 (to search from the right end). |
Examples
Parameter a | Parameter b | Parameter c | Result |
|---|---|---|---|
abcabc | c | 6 | |
abcabc | c | 5 | 3 |
abcabc | c | 2 | 0 |