$WBINDOF - index of

Availability
$WBINDOF  is available for use with all WBSP commands:

Syntax
$WBINDOF{texttobesearched|texttosearchfor|start}
$WBINDOF[texttobesearched|texttosearchfor|start]

Parameters
texttobesearched - text being searched
texttosearchfor - text sought
start - optional numeric parameter specifying the position inside texttobesearched to begin search. If it does not exist, search begins at the beginning of the texttobesearched.

Returns
Number specifying position of first occurrence of texttosearchfor inside texttobesearched after start.

Example

<!--
[FormFields]
wb_command=r
-->
<!--WB_BeginTemplate-->
<html>
<head>
<title>WBINDOF example</title>
</head>
<body>
The word Spain starts at $WBINDOF[The rain in Spain stays mainly in plains.|spain] position in sentence The rain in Spain stays mainly in plains.
</body>
</html>

After running this example, the resulting page in browser, may look like this:

The word Spain starts at 13 position in sentence The rain in Spain stays mainly in plains.