Poco Script FAQ - LinePos result when value not found

LinePos result when value not found

Q: LinePos #n $needle $haystack Returns in #n the line number of multiline variable $haystack, where $needle appears. Line numbers are zero-based!

What is the return value in #n if $needle does *not* appear in $haystack?

 
A: LinePos will return a value of -1 when the target value is not found.