@pos() Function

Top  Previous  Next

@pos() function returns the position of a substring in a string.

Syntax:

@pos(substring-expression, string-expression)

 

Examples:

@pos('-','AAA-BBB')    @// returns: 3

 

@set(v:var1,'efg')

@pos(v:var1,'abcdefgh')@// returns: 4

 

@pos('x','abcdefgh')   @// returns: 0