Main Page | Class List | Directories | File List | Class Members | File Members

string.c File Reference

CKPM C library implementation of string functions. More...

#include <string.h>
#include <stdlib.h>

Functions

char * strcpy (char *dest, const char *src)
 Copy a string. See also strcpy(3).
char * strncpy (char *dest, const char *src, size_t n)
 Copy a string. See also strncpy(3).
char * strcat (char *dest, const char *src)
 Concatenate two strings. See also strcat(3).
char * strncat (char *dest, const char *src, size_t n)
 Concatenate two strings. See also strncat(3).
int strcmp (const char *s1, const char *s2)
 Compare two strings. See also strcmp(3).
int strncmp (const char *s1, const char *s2, size_t n)
 Compare two strings. See also strncmp(3).
size_t strlen (const char *s)
 Calculate the length of a string.
char * strdup (const char *s)
 Duplicate a string.


Detailed Description

CKPM C library implementation of string functions.


Function Documentation

char* strcat char *  dest,
const char *  src
 

Concatenate two strings. See also strcat(3).

Parameters:
dest destination array
src source string
Returns:
a pointer to the destination string dest

int strcmp const char *  s1,
const char *  s2
 

Compare two strings. See also strcmp(3).

Parameters:
s1 first string
s2 second string
Returns:
0 if s1 == s2, > 0 if s1 > s1 or < 0 if s1 < s2

char* strcpy char *  dest,
const char *  src
 

Copy a string. See also strcpy(3).

Parameters:
dest destination array
src source string
Returns:
a pointer to the destination string dest

char* strdup const char *  s  ) 
 

Duplicate a string.

Parameters:
s a string
Returns:
the duplicated string

size_t strlen const char *  s  ) 
 

Calculate the length of a string.

Parameters:
s a string
Returns:
the number of characters in s

char* strncat char *  dest,
const char *  src,
size_t  n
 

Concatenate two strings. See also strncat(3).

Parameters:
dest destination array
src source string
n maximal length of concatination
Returns:
a pointer to the destination string dest

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

Compare two strings. See also strncmp(3).

Parameters:
s1 first string
s2 second string
n maximal length of comparison
Returns:
0 if s1 == s2, > 0 if s1 > s1 or < 0 if s1 < s2

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

Copy a string. See also strncpy(3).

Parameters:
dest destination array
src source string
n maximal length of copying
Returns:
a pointer to the destination string dest


Generated on Thu Jul 13 03:56:36 2006 for CKPMcc by  doxygen 1.4.4