$pos() - Support negative indexes - 27/05/21 04:46 AM
Using $pos(text, string, N)
Currently, if N <= 0, $pos returns the number of occurrences of string in text. With other string identifiers such as $left(), $mid(), $right(), $*tok, etc a negetive N causes the identifier to work in reverse.
It would be handy if $pos() would support such reversed behavior aswell
Currently, if N <= 0, $pos returns the number of occurrences of string in text. With other string identifiers such as $left(), $mid(), $right(), $*tok, etc a negetive N causes the identifier to work in reverse.
It would be handy if $pos() would support such reversed behavior aswell
Code
Example: $pos(abccba, a, -1) - returns 6