vipsi - the friendly vip script interpreter

Functions

Numeric functions

rfind

mber> = Numeric functions: rfindrfind ( <text>, <searchtext> )
mber> = Numeric functions: rfindrfind ( <text>, <searchtext>, <startindex> )

Numeric functions: findFind last occurance of Flow control: if … then
Flow control: try … then
the
<searchtext> in <text>.

Flow control: returnReturns Numeric functions: indexindex of position found Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
0.

Optionally start search Operators: Make Identifier "@"at <startindex>. Search Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
must be a Glossary: text, text_valtext value Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
start Numeric functions: indexindex must be a numeric Glossary: Valuevalue. Flow control: if … then
Flow control: try … then
The
search starts Operators: Make Identifier "@"at Flow control: if … then
Flow control: try … then
the
start Numeric functions: indexindex inclusive.

Numeric functions: indexIndexes start Operators: Make Identifier "@"at 1.

e.g.:

i> Numeric functions: rfindrfind ( "hello world", "l" )  o> = 10
i> Numeric functions: rfindrfind ( "hello world", "X" )  o> = 0
i> Numeric functions: rfindrfind ( "hello world", "ll" )  o> = 3
i> Numeric functions: rfindrfind ( "hello world", "l",  6 ) o>  = 4
i> Numeric functions: rfindrfind ( "hello world", "l",  4 ) o>  = 4
i> Numeric functions: rfindrfind ( "hello world", "ll", 4 ) o>  = 3
i> Numeric functions: rfindrfind ( "hello world", "ll", 3 ) o>  = 3
i> Numeric functions: rfindrfind ( "hello world", "ll", 2 ) o>  = 0

Valid HTML   Valid CSS