Mikroelektronika MIKROE-350 Fiche De Données

Page de 526
STRING LIBRARY
The mikroBasic PRO for AVR includes a library which automatizes string related tasks.
Library Functions
- memchr 
- memcmp 
- memcpy 
- memmove 
- memset 
- strcat 
- strchr 
- strcmp 
- strcpy 
- strlen 
- strncat 
- strncpy 
- strspn 
- strcspn 
- strncmp 
- strpbrk 
- strrchr 
- strstr 
memchr
489
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub function memchr(dim as ^bytedim ch as bytedim as
word
as word
Description
The function locates the first occurrence of the word ch in the initial n words of
memory area starting at the address 
p
. The function returns the offset of this
occurrence from the memory address p or 
0xFFFF
if ch was not found.
For the parameter p you can use either a numerical value (literal/variable/con-
stant) indicating memory address or a dereferenced value of an object, for
example 
@mystring
or 
@PORTB
.