# <strings.h> The <strings.h> header contains functions for manipulating strings. > > > int bcmp(const void \*bl, const void \*b2, size\_t len); [POSIX] void > bcopy(const void \*src, void \*dst, size\_t len); [POSIX] void > bzero(void \*b, size\_t len); [POSIX] > > > int ffs(int value); [POSIX] > > > char \*index(const char \*s, int c); [POSIX] > > > char \*rindex(const char \*s, int c); [POSIX] ## bcmp > > > int bcmp(const void \*bl, const void \*b2, size\_t len); [POSIX] The function compares byte string b1 against byte string b2, returning zero if they are identical or nonzero otherwise. Both strings are assumed to be len bytes long. Zero-length strings are always identical. The strings can overlap. ## bcopy > > > void bcopy(const void \*src, void \*dst, size\_t len); [POSIX] The function copies len bytes from string src to string dst. The two strings can overlap. If len is zero, no bytes are copied. ## bzero > > > void bzero(void \*b, size\_t len); [POSIX] The function writes len zero bytes to the string b. If len is zero, bzero does nothing. ## ffs int ffs(int value); [POSIX] The function finds the first bit set in value and returns the index of that bit. Bits are numbered starting from 1, starting at the right-most bit. A return value of 0 means that the argument was zero. ## index > > > char \*index(const char \*s, int c); [POSIX] The index function locates the first character matching c (converted to a char) in the NULL- terminated string s. A pointer to the character is returned if it is found; otherwise NULL is returned. If c is ‘\0’, index locates the terminating ‘\0’. ## rindex > > > char \*rindex(const char \*s, int c); [POSIX] The function locates the last character matching c (converted to a char) in the NULL- terminated string s. A pointer to the character is returned if it is found; otherwise NULL is returned. If c is ‘\0’, rindex locates the terminating ‘\0’. Last Published: Oct 06, 2026 [Previous Topic twalk](https://docs.qualcomm.com/bundle/publicresource/80-N3040-23/topics/c_posix_search.md) Next Topic