Dokumentaro de Gambaso
Compilation & Installation
Components
gb
Array
Error
gb.crypt
gb.qt4
Documents
Indekso de Lingvo
Language Overviews
LeguMin
Lexicon
Registro

String.InStr (gb)

Static Function InStr ( String As String, Pattern As String [ , From As Integer, Mode As Integer ] ) As Integer

Returns the position of the first occurrence of Pattern in String.

If From is specified, the search begins at the position From.

If the substring is not found, this function returns zero.

Mode can be set to gb.IgnoreCase for a case insensitive comparison.

This function returns the index of the found character, not its byte position.

Examples

PRINT String.InStr("Benoît", "t");; InStr("Benoît", "t")
6 7