The RTS library provides the standard C header file <string.h> as well as the
POSIX header file <strings.h>, which provides additional functions not required
by the C standard. The POSIX header file <strings.h> provides:
- bcmp(), which is equivalent to
memcmp()
- bcopy(), which is equivalent to
memmove()
- bzero(), which is equivalent to
memset(.., 0, ...);
- ffs(), which finds the first bit
set and returns the index of that bit
- index(), which is equivalent to
strchr()
- rindex(), which is equivalent to
strrchr()
- strcasecmp() and strncasecmp(),
which perform case-insensitive string comparisons
In addition, the header file <string.h> provides one additional function not
required by the C standard.
- strdup(), which duplicates a
string by dynamically allocating memory (as if by using malloc) and copying the
string to this allocated memory