
put FindNext(source,"category")
-- 49
FindPrevious(sourceString,findString) - where sourceString is the string to search in and
findString is the string to look for. Returns an integer character position in sourceString of the
occurence of findString before the current search position or 0 if the string was not found or if
there was an error.
Finds the first occurrence of findString in sourceString before the current position and returns the
character position of its first character in sourceString. Current position may have been set by a
previous Find or Replace or by the SetPosition command. After FindPrevious the current position
is the return value of FindPrevious. If there is no occurence before the current position,
FindPrevious returns 0, which sets the current positon to 0.
Example:
set source = "When you select a category, the filters in that category appear in a list."
setPosition(40)
put FindPrevious(source,"category")
-- 19
FindAll(sourceString,findString) - where sourceString is the string to search in and findString is
the string to look for. Returns a list containing the starting character positions of all occurrences
of findString in sourceString or empty list if the string was not found or if there was an error.
Finds all occurrences of findString in sourceString and returns a list of the character positions of
each found string in sourceString. Not affected by SetPosition. Always searches from character 1
of sourceString. Does not affect current position.
Example:
set source = "When you select a category, the filters in that category appear in a list."
put FindAll(source,"category")
-- [19, 49]
Online Help
26
Comentarios a estos manuales