#include <string.h>
The string functions perform string operations on NULL terminated strings.
Defines | |
#define | X_hi r27 |
Functions | |
void * | memccpy (void *, const void *, int, size_t) |
void * | memchr (const void *, int, size_t) __ATTR_PURE__ |
int | memcmp (const void *, const void *, size_t) __ATTR_PURE__ |
void * | memcpy (void *, const void *, size_t) |
void * | memmove (void *, const void *, size_t) |
void * | memset (void *, int, size_t) |
int | strcasecmp (const char *, const char *) __ATTR_PURE__ |
char * | strcat (char *, const char *) |
char * | strchr (const char *, int) __ATTR_PURE__ |
int | strcmp (const char *, const char *) __ATTR_PURE__ |
char * | strcpy (char *, const char *) |
size_t | strlcat (char *, const char *, size_t) |
size_t | strlcpy (char *, const char *, size_t) |
size_t | strlen (const char *) __ATTR_PURE__ |
char * | strlwr (char *) |
int | strncasecmp (const char *, const char *, size_t) __ATTR_PURE__ |
char * | strncat (char *, const char *, size_t) |
int | strncmp (const char *, const char *, size_t) |
char * | strncpy (char *, const char *, size_t) |
size_t | strnlen (const char *, size_t) __ATTR_PURE__ |
char * | strrchr (const char *, int) __ATTR_PURE__ |
char * | strrev (char *) |
char * | strstr (const char *, const char *) __ATTR_PURE__ |
char * | strupr (char *) |
|
Parse a string into tokens. *strsep(char **string, const char *delim) The strsep() function locates, in the string referenced by *string, the first occurrence of any character in the string delim (or the terminating `' character) and replaces it with a `'. The location of the next character after the delimiter character (or NULL, if the end of the string was reached) is stored in *string. An ``empty'' field, i.e. one caused by two adjacent delimiter characters, can be detected by comparing the location referenced by the pointer returned in *string to `'.
|
|
Copy memory area. The memccpy() function copies no more than len bytes from memory area src to memory area dest, stopping when the character val is found.
|
|
Scan memory for a character. The memchr() function scans the first len bytes of the memory area pointed to by src for the character val. The first byte to match val (interpreted as an unsigned character) stops the operation.
|
|
Compare memory areas. The memcmp() function compares the first len bytes of the memory areas s1 and s2. The comparision is performed using unsigned char operations.
|
|
Copy a memory area. The memcpy() function copies len bytes from memory area src to memory area dest. The memory areas may not overlap. Use memmove() if the memory areas do overlap.
|
|
Copy memory area. The memmove() function copies len bytes from memory area src to memory area dest. The memory areas may overlap.
|
|
Fill memory with a constant byte. The memset() function fills the first len bytes of the memory area pointed to by dest with the constant byte val.
|
|
Compare two strings ignoring case. The strcasecmp() function compares the two strings s1 and s2, ignoring the case of the characters.
|
|
Concatenate two strings. The strcat() function appends the src string to the dest string overwriting the `' character at the end of dest, and then adds a terminating `' character. The strings may not overlap, and the dest string must have enough space for the result.
|
|
Locate character in string. The strchr() function returns a pointer to the first occurrence of the character val in the string src. Here "character" means "byte" - these functions do not work with wide or multi-byte characters.
|
|
Compare two strings. The strcmp() function compares the two strings s1 and s2.
|
|
Copy a string. The strcpy() function copies the string pointed to by src (including the terminating `' character) to the array pointed to by dest. The strings may not overlap, and the destination string dest must be large enough to receive the copy.
|
|
Concatenate two strings. Appends src to string dst of size siz (unlike strncat(), siz is the full size of dst, not space left). At most siz-1 characters will be copied. Always NULL terminates (unless siz <= strlen(dst)).
|
|
Copy a string. Copy src to string dst of size siz. At most siz-1 characters will be copied. Always NULL terminates (unless siz == 0).
|
|
Calculate the length of a string. The strlen() function calculates the length of the string src, not including the terminating `' character.
|
|
Convert a string to lower case. The strlwr() function will convert a string to lower case. Only the upper case alphabetic characters [A .. Z] are converted. Non-alphabetic characters will not be changed.
|
|
Compare two strings ignoring case. The strncasecmp() function is similar to strcasecmp(), except it only compares the first n characters of s1.
|
|
Concatenate two strings. The strncat() function is similar to strcat(), except that only the first n characters of src are appended to dest.
|
|
Compare two strings. The strncmp() function is similar to strcmp(), except it only compares the first (at most) n characters of s1 and s2.
|
|
Copy a string. The strncpy() function is similar to strcpy(), except that not more than n bytes of src are copied. Thus, if there is no null byte among the first n bytes of src, the result will not be null-terminated. In the case where the length of src is less than that of n, the remainder of dest will be padded with nulls.
|
|
Determine the length of a fixed-size string. The strnlen function returns the number of characters in the string pointed to by src, not including the terminating '' character, but at most len. In doing this, strnlen looks only at the first len characters at src and never beyond src+len.
|
|
Locate character in string. The strrchr() function returns a pointer to the last occurrence of the character val in the string src. Here "character" means "byte" - these functions do not work with wide or multi-byte characters.
|
|
Reverse a string. The strrev() function reverses the order of the string.
|
|
Locate a substring.
The strstr() function finds the first occurrence of the substring
|
|
Convert a string to upper case. The strupr() function will convert a string to upper case. Only the lower case alphabetic characters [a .. z] are converted. Non-alphabetic characters will not be changed.
|