Mikroelektronika MIKROE-350 Fiche De Données
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
- 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 p as ^byte, dim ch as byte, dim n as
word) as word
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
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
stant) indicating memory address or a dereferenced value of an object, for
example
@mystring
or
@PORTB
.