|
ginnOS
The reference: libc, the libraries and the kernel
|
This file contains the declarations of string manipulation functions. More...
#include <sys/types.h>Go to the source code of this file.
Macros | |
| #define | NULL ((void *)0) |
Functions | |
| size_t | strlen (const char *s) |
| computes the length of the string s. | |
| int | strcmp (const char *s1, const char *s2) |
| compares the string s1 to the string s2. | |
| int | strncmp (const char *s1, const char *s2, size_t n) |
| compares the first n bytes of the string s1 to the first n bytes of the string s2. | |
| char * | strcpy (char *dst, const char *src) |
| copies the string pointed to by src, including the terminating null byte ('\0'), to the buffer pointed to by dst. | |
| char * | strncpy (char *dst, const char *src, size_t n) |
| copies up to n bytes from the string pointed to by src to the buffer pointed to by dst. | |
| char * | strcat (char *dst, const char *src) |
| appends the string pointed to by src to the end of the string pointed to by dst. | |
| char * | strchr (const char *s, int c) |
| appends up to n bytes from the string pointed to by src to the end of the string pointed to by dst. | |
| char * | strrchr (const char *s, int c) |
| locates the last occurrence of c (converted to a char) in the string pointed to by s. | |
| char * | strtok (char *str, const char *delim) |
| tokenizes the string str using the delimiters specified in delim. | |
| void * | memcpy (void *dst, const void *src, size_t n) |
| copies n bytes from memory area src to memory area dst. | |
| void * | memset (void *dst, int c, size_t n) |
| fills the first n bytes of the memory area pointed to by dst with the constant byte c. | |
| int | memcmp (const void *s1, const void *s2, size_t n) |
| compares the first n bytes of the memory areas s1 and s2. | |
| void * | memmove (void *dst, const void *src, size_t n) |
| copies n bytes from memory area src to memory area dst. | |
| size_t | strnlen (const char *s, size_t max) |
| char * | strncat (char *dst, const char *src, size_t n) |
| char * | strdup (const char *s) |
| char * | strndup (const char *s, size_t n) |
| char * | strstr (const char *haystack, const char *needle) |
| char * | strpbrk (const char *s, const char *accept) |
| size_t | strspn (const char *s, const char *accept) |
| size_t | strcspn (const char *s, const char *reject) |
| char * | strtok_r (char *str, const char *delim, char **saveptr) |
| int | strcasecmp (const char *a, const char *b) |
| int | strncasecmp (const char *a, const char *b, size_t n) |
| int | strcoll (const char *a, const char *b) |
| void * | memchr (const void *s, int c, size_t n) |
| const char * | strerror (int errnum) |
| char * | strsignal (int sig) |
| a description of a signal ("Terminated"), or "Unknown signal N" | |
This file contains the declarations of string manipulation functions.
| #define NULL ((void *)0) |
| size_t strlen | ( | const char * | s | ) |
computes the length of the string s.
| s | the string to compute the length of. |
| int strcmp | ( | const char * | s1, |
| const char * | s2 ) |
compares the string s1 to the string s2.
| s1 | the first string to compare. |
| s2 | the second string to compare. |
| int strncmp | ( | const char * | s1, |
| const char * | s2, | ||
| size_t | n ) |
compares the first n bytes of the string s1 to the first n bytes of the string s2.
| s1 | the first string to compare. |
| s2 | the second string to compare. |
| n | the number of bytes to compare. |
| char * strcpy | ( | char * | dst, |
| const char * | src ) |
copies the string pointed to by src, including the terminating null byte ('\0'), to the buffer pointed to by dst.
| dst | the destination buffer. |
| src | the source string to copy. |
| char * strncpy | ( | char * | dst, |
| const char * | src, | ||
| size_t | n ) |
copies up to n bytes from the string pointed to by src to the buffer pointed to by dst.
| dst | the destination buffer. |
| src | the source string to copy. |
| n | the maximum number of bytes to copy. |
| char * strcat | ( | char * | dst, |
| const char * | src ) |
appends the string pointed to by src to the end of the string pointed to by dst.
| dst | the destination string to which src will be appended. |
| src | the source string to append. |
| char * strchr | ( | const char * | s, |
| int | c ) |
appends up to n bytes from the string pointed to by src to the end of the string pointed to by dst.
| dst | the destination string to which src will be appended. |
| src | the source string to append. |
| n | the maximum number of bytes to append. |
| char * strrchr | ( | const char * | s, |
| int | c ) |
locates the last occurrence of c (converted to a char) in the string pointed to by s.
| s | the string to search. |
| c | the character to locate. |
| char * strtok | ( | char * | str, |
| const char * | delim ) |
tokenizes the string str using the delimiters specified in delim.
| str | the string to tokenize. On the first call, str should point to the string to tokenize. On subsequent calls, str should be NULL. |
| delim | a string containing the delimiters to use for tokenization. |
| void * memcpy | ( | void * | dst, |
| const void * | src, | ||
| size_t | n ) |
copies n bytes from memory area src to memory area dst.
The memory areas must not overlap.
| dst | the destination memory area. |
| src | the source memory area. |
| n | the number of bytes to copy. |
| void * memset | ( | void * | dst, |
| int | c, | ||
| size_t | n ) |
fills the first n bytes of the memory area pointed to by dst with the constant byte c.
| dst | the memory area to fill. |
| c | the byte to fill the memory area with. |
| n | the number of bytes to fill. |
| int memcmp | ( | const void * | s1, |
| const void * | s2, | ||
| size_t | n ) |
compares the first n bytes of the memory areas s1 and s2.
| s1 | the first memory area to compare. |
| s2 | the second memory area to compare. |
| n | the number of bytes to compare. |
| void * memmove | ( | void * | dst, |
| const void * | src, | ||
| size_t | n ) |
copies n bytes from memory area src to memory area dst.
The memory areas may overlap.
| dst | the destination memory area. |
| src | the source memory area. |
| n | the number of bytes to copy. |
| char * strncat | ( | char * | dst, |
| const char * | src, | ||
| size_t | n ) |
| char * strdup | ( | const char * | s | ) |
| char * strndup | ( | const char * | s, |
| size_t | n ) |
| char * strstr | ( | const char * | haystack, |
| const char * | needle ) |
| char * strpbrk | ( | const char * | s, |
| const char * | accept ) |
| size_t strspn | ( | const char * | s, |
| const char * | accept ) |
| size_t strcspn | ( | const char * | s, |
| const char * | reject ) |
| char * strtok_r | ( | char * | str, |
| const char * | delim, | ||
| char ** | saveptr ) |
| int strcasecmp | ( | const char * | a, |
| const char * | b ) |
| int strncasecmp | ( | const char * | a, |
| const char * | b, | ||
| size_t | n ) |
| int strcoll | ( | const char * | a, |
| const char * | b ) |
| void * memchr | ( | const void * | s, |
| int | c, | ||
| size_t | n ) |
| const char * strerror | ( | int | errnum | ) |
| char * strsignal | ( | int | sig | ) |
a description of a signal ("Terminated"), or "Unknown signal N"