Main Page | Modules | Namespace List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

string.c File Reference


Functions

 FILE (string)
char * strscn (char *s, char *pattern)
char * strupr (char *s)
char * strlwr (char *s)
int stricmp (const char *s1, const char *s2)
int strnicmp (const char *s1, const char *s2, size_t n)
char * strcpy (char *dest, const char *src)
char * strncpy (char *dest, const char *src, size_t count)
size_t strlcpy (char *dest, const char *src, size_t size)
char * strcat (char *dest, const char *src)
size_t strlcat (char *dest, const char *src, size_t count)
int strcmp (const char *cs, const char *ct)
int strncmp (const char *cs, const char *ct, size_t count)
char * strchr (const char *s, int c)
char * strnchr (const char *s, size_t count, int c)
size_t strlen (const char *s)
size_t strnlen (const char *s, size_t count)
size_t strspn (const char *s, const char *accept)
size_t strcspn (const char *s, const char *reject)
char * strpbrk (const char *cs, const char *ct)
char * strsep (char **s, const char *ct)

Function Documentation

FILE string   ) 
 

char* strcat char *  dest,
const char *  src
 

strcat - Append one NUL-terminated string to another : The string to be appended to : The string to append to it

char* strchr const char *  s,
int  c
 

strchr - Find the first occurrence of a character in a string : The string to be searched : The character to search for

int strcmp const char *  cs,
const char *  ct
 

strcmp - Compare two strings : One string : Another string

char* strcpy char *  dest,
const char *  src
 

strcpy - Copy a NUL terminated string : Where to copy the string to : Where to copy the string from

size_t strcspn const char *  s,
const char *  reject
 

strcspn - Calculate the length of the initial substring of which does not contain letters in : The string to be searched : The string to avoid

size_t strlcat char *  dest,
const char *  src,
size_t  count
 

strlcat - Append a length-limited, NUL-terminated string to another : The string to be appended to : The string to append to it : The size of the destination buffer.

size_t strlcpy char *  dest,
const char *  src,
size_t  size
 

strlcpy - Copy a NUL terminated string into a sized buffer : Where to copy the string to : Where to copy the string from : size of destination buffer

Compatible with *BSD: the result is always a valid NUL-terminated string that fits in the buffer (unless, of course, the buffer size is zero). It does not pad out the result like strncpy() does.

size_t strlen const char *  s  ) 
 

strlen - Find the length of a string : The string to be sized

char* strlwr char *  s  ) 
 

char* strnchr const char *  s,
size_t  count,
int  c
 

strnchr - Find a character in a length limited string : The string to be searched : The number of characters to be searched : The character to search for

int strncmp const char *  cs,
const char *  ct,
size_t  count
 

strncmp - Compare two length-limited strings : One string : Another string : The maximum number of bytes to compare

char* strncpy char *  dest,
const char *  src,
size_t  count
 

strncpy - Copy a length-limited, NUL-terminated string : Where to copy the string to : Where to copy the string from : The maximum number of bytes to copy

The result is not NUL-terminated if the source exceeds bytes.

In the case where the length of is less than that of count, the remainder of will be padded with NUL.

int strnicmp const char *  s1,
const char *  s2,
size_t  n
 

size_t strnlen const char *  s,
size_t  count
 

strnlen - Find the length of a length-limited string : The string to be sized : The maximum number of bytes to search

char* strpbrk const char *  cs,
const char *  ct
 

strpbrk - Find the first occurrence of a set of characters : The string to be searched : The characters to search for

char* strscn char *  s,
char *  pattern
 

char* strsep char **  s,
const char *  ct
 

strsep - Split a string into tokens : The string to be searched : The characters to search for

strsep() updates to point after the token, ready for the next call.

It returns empty tokens, too, behaving exactly like the libc function of that name. In fact, it was stolen from glibc2 and de-fancy-fied. Same semantics, slimmer shape. ;)

size_t strspn const char *  s,
const char *  accept
 

strspn - Calculate the length of the initial substring of which only contain letters in : The string to be searched : The string to search for

char* strupr char *  s  ) 
 


Generated on Fri Feb 3 14:33:23 2006 for VDK Blacksheep by  doxygen 1.4.1