Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- QuickBASIC 3.0 - <b>instr find substring</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INSTR                    Find Substring

 INSTR([start,] stringexp1,stringexp2)

    Returns the character position within a string at which a substring is
    found.

  stringexp1    The string to be scanned.

  stringexp2    The substring to be searched for.

       start    A numeric expression in the range 1 to 255; an optional
                offset from which to start searching.

   ----------------------------------------------------------------------

      Notes:    If start is specified, BASIC begins searching at the
                character at offset start (The first character in the
                string is at offset 1). Whether or not start is specified,
                INSTR returns the position at which stringexp2 is found--
                relative to the first character in the string (not to
                start).

                If stringexp1 is null or if start is greater than
                LEN(stringexp1), INSTR returns 0.

                If stringexp2 is null, then INSTR returns 1 (if start was
                specified, then INSTR returns start.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson