sql:strpos( $target as xs:string?, $test as xs:string?, [$collation as xs:string?] ) as xs:integer?
Returns an integer value representing the starting position of a string within the search string. Note, the string starting position is 1. If the first parameter is empty, the result is the empty sequence.
sql:strpos("searchintext","chin") => 5
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.