/ lang / rinstr
RInStr
Syntax

    Position = RInStr ( String AS String , Substring AS String [ , Start AS Integer , Comparison AS Integer ] )

Returns the position of the last occurrence of Substring in String from right to left.

If Start is specified, the search starts at the position Start.

Comparison can be one of the following value:

- gb.Binary for a binary comparison (the default).
- gb.Text or gb.Case for a case-insensitive comparison.

If the substring is not found, this function returns zero.

### Examples

    PRINT RInStr("Gambas is basic", "bas")
    <hr>11

    PRINT RInStr("Gambas is basic", "bas", 10)
    <hr>4

    PRINT RInStr("Gambas is basic", "not")
    <hr>0

### See also

String Functions