String functions
#include <string.h>
A small subset of the standard C string.h
has been implemented in
brickOS
-
void *
memcpy
( void *dest, const void *src, size_t size );
-
copies a memory block from
src
to dest
of size
size
bytes
returns: dest
-
void *
memset
( void *dest, int c, size_t n );
-
Fills a memory block of size
n
bytes at dest
with
byte value c
returns: dest
-
int
strcmp
( const char *s1, const char *s2 );
-
performs a lexicographic comparison of two NULL-terminated strings
s1
and s2
returns:
- < 0 if
s1
< s2
- > 0 if
s1
> s2
- zero if
s1
== s2
-
char *
strcpy
( char *dest, char *src );
-
copy a null terminated string
src
into memory block starting at
dest
returns: dest
-
int
strlen
( const char *s );
-
returns: length of null terminated string
s