LOTUSSCRIPT LANGUAGE


InStrB function
Example

Returns the position of the byte beginning the first occurrence of one string within another string.

Syntax

InStrB ( [ begin , ] string1 , string2 )

Elements

begin


string1
string2
Return value

InStrB returns the byte position of the first occurrence of string2 in string1. The following table shows how the function responds to various conditions.
ConditionReturn value
string1 is " " (the empty string)0
string2 is not found after begin in string10
begin is larger than the length of string10
string2 is "" (the empty string)The value of begin. (If you omit begin, InStrB returns the value 1.)
string1 is NULLNULL
string2 is NULLNULL
begin is NULLError

Usage

If you want to work with characters, use the InStr function.

Note The byte position returned by InStrB is independent of the platform-specific byte order.

Example
See Also