| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <html>
- <head>
- <title>Blitz3D Docs</title>
- <link rel=stylesheet href=../css/commands.css type=text/css>
- </head>
- <body>
- <h1>Instr (string1$, string2$, offset)</h1>
- <h1>Parameters</h1>
- <table>
- <tr>
- <td>
- string1$ = the string you wish to search
<br />
- string2$ = the string to find
<br />
- offset = valid integer starting position to being search (optional)
- </td>
- </tr>
- </table>
- <h1>Description</h1>
- <table>
- <tr>
- <td>
- This command will allow you to search for an occurance of a string within another string. The command returns the location (number of characters from the left) of the string you are looking for. Command returns a Zero if no matches are found.
- </td>
- </tr>
- </table>
- <h1><a href=../2d_examples/Instr.bb>Example</a></h1>
- <table>
- <tr>
- <td>
- name$="Shane R. Monroe"
<br />
- location = Instr( name$,"R.",1)
<br />
- Print "Your string contains 'R.' at position number " + location + "!"
<br />
- </td>
- </tr>
- </table>
- <br>
- <a target=_top href=../index.htm>Index</a><br>
- <br>
- Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=Instr&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
- </html>
|