Mikroelektronika MIKROE-350 Fiche De Données

Page de 526
strspn
strstr
494
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub function strspn(dim byref s1, s2 as string[100]) as byte
Description
The function searches the string 
s1
for characters not found in the 
s2
string.
The function returns the index of first character located in 
s1
that does not
match a character in 
s2
. If the first character in 
s1
does not match a character in
s2
, a value of 0 is returned. If all characters in 
s1
are found in 
s2
, the length of
s1 is returned (not including the terminating null character).
Prototype
sub function strstr(dim byref s1, s2 as string[100]) as word
Description
The function locates the first occurrence of the string 
s2
in the string 
s1
(exclud-
ing the terminating null character).
The function returns a number indicating the position of the first occurrence of
s2
in 
s1
; if no string was found, the function returns 
0xFFFF
. If 
s2
is a null string,
the function returns 0.