Datasheet
strcpy
strcspn
strlen
strncat
492
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub procedure strcpy(dim byref s1, s2 as string[100])
Description
The function copies the value of the string s2 to the string s1 and appends a
null character to the end of s1.
Prototype
sub function strcspn(dim byref s1, s2 as string[100]) as word
Description
The function searches the string s1 for any of the characters in the string s2.
The function returns the index of the first character located in s1 that matches
any character in
s2. If the first character in s1 matches a character in s2, a
value of 0 is returned. If there are no matching characters in
s1, the length of
the string is returned (not including the terminating null character).
Prototype
sub function strlen(dim byref s as string[100]) as word
Description
The function returns the length, in words, of the string s. The length does not
include the null terminating character.
Prototype
sub procedure strncat(dim byref s1, s2 as string[100], dim size
as byte)
Description
The function appends at most size characters from the string s2 to the string s1
and terminates s1 with a null character. If s2 is shorter than the size charac-
ters, s2 is copied up to and including the null terminating character.