@lpos() Function |
![]() ![]() ![]() |
@lpos() function seeks a substring in the given string in right-to-left order and returns the start position of it. If substring is not found then "0" is returned. Syntax: @lpos(substring, string)
Examples: @lpos('-','AAA-BBB-CCC') @// result: 8
@set(v:var1,'xyz') @lpos(v:var1,'xyz abc xyz abc') @// result: 9
@lpos('x','abcdefgh') @// result: 0
See @pos() |