Futurebasic/Language/Reference/instr

From Wikibooks, open books for an open world
Jump to navigation Jump to search

INSTR[edit | edit source]

Function[edit | edit source]

Appearance Standard Console

Syntax[edit | edit source]

targetString$|targetContainer$$,searchString$|searchContainer$$)

Revised[edit | edit source]

May 30, 2000 (Release 3)

Description[edit | edit source]

This function searches for the first occurrence of searchString$ or searchContainer$$ within targetString$ or targetContainer$$, starting at character position startPos . (If startPos is less than 1, it's treated as 1.) If a match is found, the function returns the character position (1..255) within targetString$ or targetContainer$$ where the match begins. If no match is found, the function returns zero. The string search is case-sensitive. Note: INSTR always returns zero in these cases:

   * when startPos is greater than LEN(targetString$)
   * when LEN(searchString$) is zero.

See Also[edit | edit source]

INDEXF; MID$; LEFT$; RIGHT$