#include
<VBSTRING.bas>
' source in /Program Files/Coridium/BASIClib
FUNCTION MID( string , start, length ) as STRING
This FUNCTION written in BASIC returning the portion
of string from the start character for length
characters.
String may be a constant or variable string.
start is based on 1 being the first character, which is consistant with the MID VB function, but inconsistant with the VB searchee.Chars(0) being the first character. The C style MIDSTR version of this routine uses 0 as the first character.
Extracting or setting a single byte in a string can be done with an index STRING(3) refers to the 4th byte of the string (starts from 0).