Returns the position of a word in a text or -1 if it does not find it.

1 string.find

<string.find>
    <text /> !
    <word /> !
</string.find>

Exceptions

requires 2 arguments, received: ...

The 2 entry parameters has not been specified.

Example

Search of a string in a text string.

Copy
<xsql-script name='string_find'>
    <body>
        <set name='text'>This is a search test text</set>
        <set name='word'>test</set>
        <println>
            <string.find>
                <text/>
                <word/>
            </string.find>
        </println>
    </body>
</xsql-script>

Returns:

Copy
20