MarkLogic Server 11.0 Product Documentation
xdmp.positionxdmp.position(
test as String?,
target as String?,
[collation as String?]
) as Number?
Summary
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.
Parameters |
test |
The string to test for existence in the second parameter.
|
target |
The string from which to test.
|
collation |
The optional name of a valid collation URI. For information on the
collation URI syntax, see the Search Developer's Guide.
|
Example
xdmp.position("chin","searchintext");
=> 5
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.