webCOMAND

#STRRPOS

Return the position of the last occurrence of a substring in a string.

Prototype

#STRRPOS($haystack, $needle)

Parameters

  • haystack - The string to search in.
  • needle -  The string to search for.

Return

Returns the zero-based position of the last occurrence of needle in haystack.

Example

#/ Position: 8
#LOCAL($Text, "This is some text.")
Position: #STRRPOS($Text, "s")

#/ Position: 7
#ASSIGN($Text, "Мощный курс")
Position: #STRRPOS($Text, "курс")

Related

#STRPOS, #STRSTR