Purpose The searchText command allows you to search for a specific string within a long text variable.
Examples

Further examples
SearchText "t1" string="Vivaldi"

This searches for the string "Vivaldi" within the long text variable t1.
Format SearchText "textvar" string="string1"  

"textvar" is the name of the long text variable to search in, "string1" is the string to search.  After execution, you can use if Q[ok] to check whether the string was found

Options
hexString= Specifies the string to search in hexadecimal notation, e,g, "EF1A" or "ef1a".
fromOffset= Specifies the starting position for the search (in bytes)
returnOffset= If the string is found, returns the offset (in bytes) within the text. If not found, returns the total length of the text (in bytes).
Example We count how many times the string “Vivaldi” appears in a text:
GuiXT
// Start with offset 0
Set V[offset] 0

// Number of hits
Set V[n] 0

label searchnext
	SearchText "t1" string="Vivaldi" _
	   fromOffset="&V[offset]" _
	   returnoffset="offset"

	if Q[ok]

	  // Increase hit count
	  Set V[n] &V[n] + 1

	  // Increase search offset
	  Set V[offset] &V[offset] + 1

	  // continue searching
	  goto searchnext
	endif

Message "The string 'Vivaldi' appears &V[n] times in the text."
Components GuiXT + InputAssistant