Samsung Internal API reference  2.0
string.h File Reference

String manipulation funcitons. More...

Go to the source code of this file.

Functions

errno_t memcpy_s (void *restrict dest, rsize_t dest_max, const void *restrict src, rsize_t n)
 Check arguments and copy src sized memory area to dest. Memory must not be overlapped. To copy overlapped area use memmove_s() function. More...
 
errno_t memmove_s (void *dest, rsize_t dest_max, const void *src, rsize_t n)
 Check arguments and copy src sized memory area to dest. Memory may be overlapped. More...
 
errno_t memset_s (void *block, rsize_t block_max, int c, rsize_t n)
 Check arguments and fill n bytes of block sized memory with c constant value. More...
 
size_t strnlen_s (const char *s, size_t s_max)
 Check arguments and calculate the length of the s fixed-size string, excluding the terminating null byte ('\0'). More...
 
errno_t strcpy_s (char *restrict dest, rsize_t dest_max, const char *restrict src)
 Check arguments and copy the src string, including the terminating null byte ('\0'), to the dest sized buffer. If n is bigger than size of src then the remaining characters (after '\0') are unspecified. More...
 
errno_t strncpy_s (char *restrict dest, rsize_t dest_max, const char *restrict src, rsize_t n)
 Check arguments and copy at most n bytes of the src string, including the terminating null byte ('\0') to the dest sized buffer. More...
 
errno_t strcat_s (char *restrict dest, rsize_t dest_max, const char *restrict src)
 Check arguments and append the src string to the dest string, overwriting the terminating null byte ('\0') at the end of dest, and add a terminating null byte. More...
 
errno_t strncat_s (char *restrict dest, rsize_t dest_max, const char *restrict src, rsize_t n)
 Check arguments and append at most n bytes of src string to the dest string, overwriting the terminating null byte ('\0') at the end of dest and then adds a terminating null byte. More...
 
errno_t strerror_s (char *buf, rsize_t bufmax, errno_t errnum)
 Check arguments and return a pointer to a buf string that describes the errnum error code. More...
 
void * memcpy (void *dest, const void *src, size_t n)
 Copy memory area from src to dst. The memory must not overlap. To copy overlapped area use memmove() function. More...
 
void * memmove (void *dest, const void *src, size_t n)
 Copy memory area from src to dest. The memory may overlap. More...
 
int memcmp (const void *s1, const void *s2, size_t n)
 Compare fist n bytes of memory pointed by s1 and s2. More...
 
void * memset (void *block, int c, size_t size)
 Fill size bytes with a constant value. More...
 
size_t strlen (const char *s)
 Calculate the length of the string s, excluding the terminating null byte ('\0'). More...
 
size_t strnlen (const char *s, size_t n)
 Calculate the length of the fixed-size string s, excluding the terminating null byte ('\0'). More...
 
char * strcpy (char *dest, const char *src)
 Copy the string pointed to by src, including the terminating null byte ('\0'), to the buffer pointed to by dest. More...
 
char * strncpy (char *dest, const char *src, size_t n)
 Copy at most n bytes of the string pointed to by src, including the terminating null byte ('\0'), to the buffer pointed to by dest. More...
 
char * strdup (const char *s)
 Return a pointer to a new string which is a duplicate of the string s. Memory for the new string is obtained with malloc(). More...
 
char * strstr (const char *text, const char *pattern)
 Find the first occurrence of the substring pattern in the string text. The terminating null bytes ('\0') are not compared. More...
 
char * strncat (char *dest, const char *src, size_t n)
 Append the src string to the dest string, overwriting the terminating null byte ('\0') at the end of dest, and then adds a terminating null byte. More...
 
size_t strlcat (char *dest, const char *src, size_t n)
 Append the NUL-terminated string src to the end of dest string, overwriting the terminating null byte ('\0') at the end of dest, and guarantee to NUL-terminate the result. More...
 
char * strcat (char *dest, const char *src)
 Append the src string to the dest string, overwriting the terminating null byte ('\0') at the end of dest, and then adds a terminating null byte. More...
 
int strcmp (const char *s1, const char *s2)
 Compare the two strings s1 and s2. More...
 
int strncmp (const char *s1, const char *s2, size_t n)
 Compare at most n bytes of two strings s1 and s2. More...
 
char * strrchr (const char *s, int c)
 Find last occurence of character c in string s. More...
 
const char * strerror (int errnum)
 Return a pointer to a string that describes the error code passed in the argument errnum. More...
 
void * memchr (const void *s, int c, size_t n)
 Find a character in an area of memory. More...
 
void * memrchr (const void *s, int c, size_t n)
 Find a character in an area of memory. More...
 
char * strchr (const char *s, int c)
 Find first occurence of character c in string s. More...
 
char * strchrnul (const char *s, int c)
 Find first occurence of character c in string s. More...
 
size_t strspn (const char *s, const char *accept)
 Calculate the length (in bytes) of the initial segment of s which consists entirely of bytes in accept. More...
 
size_t strcspn (const char *s, const char *reject)
 Calculate the length of the initial segment of s which consists entirely of bytes not in reject. More...
 
char * strtok (char *str, const char *delim)
 Function breaks a string into a sequence of zero or more nonempty tokens. More...
 
char * strtok_r (char *_restrict_ s, const char *_restrict_ sep, char **_restrict_ p)
 Function breaks a string into a sequence of zero or more nonempty tokens. More...
 
int strerror_r (int errnum, char *buf, size_t buflen)
 Returns the error string in the user-supplied buf of length buflen. XSI-compliant version. More...
 

Detailed Description

String manipulation funcitons.