197
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
Instr Function
Function:
Finds the Nth occurrence (defined by num, counting from
1) of a substring substr in a string sourcestr. Search is
conducted from position frompos (leftmost character has
position 1).
Syntax:
instr(frompos as byte,byref sourcestr as string, byref
substr as string, num as byte) as byte
See Also:
---
Part
Description
frompos
Position in the sourcestr from which to start searching.
Leftmost character has position 1.
sourcestr
Source string in which the substring is to be found.
substr
Substring to search for within the source string.
num
Occurrence number of the substr, counting from 1.
Details
This function returns position in a string or zero if the Nth occurrence of the
substring is not found.
Examples
x = substr(3,
"ABCABCDEABC12"
,
"BC",2
)
' result will be 10
Lbin Function
Function:
Converts unsigned 32-bit numeric value (dword) into its
binary string representation.
Syntax:
lbin(byref num as dword) as string
See Also:
,
,
,
,
,
,
Part
Description
num
Value to convert.
Details
Standard "&b" prefix is added at the beginning of the string.
Examples
207
199
208
200
190
195
199
210
200