Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
string.c File Reference
#include <linux/types.h>
#include <linux/module.h>

Go to the source code of this file.

Macros

#define IN_ARCH_STRING_C   1
 

Functions

size_t strlen (const char *s)
 
 EXPORT_SYMBOL (strlen)
 
size_t strnlen (const char *s, size_t n)
 
 EXPORT_SYMBOL (strnlen)
 
charstrcpy (char *dest, const char *src)
 
 EXPORT_SYMBOL (strcpy)
 
size_t strlcpy (char *dest, const char *src, size_t size)
 
 EXPORT_SYMBOL (strlcpy)
 
charstrncpy (char *dest, const char *src, size_t n)
 
 EXPORT_SYMBOL (strncpy)
 
charstrcat (char *dest, const char *src)
 
 EXPORT_SYMBOL (strcat)
 
size_t strlcat (char *dest, const char *src, size_t n)
 
 EXPORT_SYMBOL (strlcat)
 
charstrncat (char *dest, const char *src, size_t n)
 
 EXPORT_SYMBOL (strncat)
 
int strcmp (const char *cs, const char *ct)
 
 EXPORT_SYMBOL (strcmp)
 
charstrrchr (const char *s, int c)
 
 EXPORT_SYMBOL (strrchr)
 
charstrstr (const char *s1, const char *s2)
 
 EXPORT_SYMBOL (strstr)
 
voidmemchr (const void *s, int c, size_t n)
 
 EXPORT_SYMBOL (memchr)
 
int memcmp (const void *cs, const void *ct, size_t n)
 
 EXPORT_SYMBOL (memcmp)
 
voidmemscan (void *s, int c, size_t n)
 
 EXPORT_SYMBOL (memscan)
 

Macro Definition Documentation

#define IN_ARCH_STRING_C   1

Definition at line 9 of file string.c.

Function Documentation

EXPORT_SYMBOL ( strlen  )
EXPORT_SYMBOL ( strnlen  )
EXPORT_SYMBOL ( strcpy  )
EXPORT_SYMBOL ( strlcpy  )
EXPORT_SYMBOL ( strncpy  )
EXPORT_SYMBOL ( strcat  )
EXPORT_SYMBOL ( strlcat  )
EXPORT_SYMBOL ( strncat  )
EXPORT_SYMBOL ( strcmp  )
EXPORT_SYMBOL ( strrchr  )
EXPORT_SYMBOL ( strstr  )
EXPORT_SYMBOL ( memchr  )
EXPORT_SYMBOL ( memcmp  )
EXPORT_SYMBOL ( memscan  )
void* memchr ( const void s,
int  c,
size_t  n 
)

memchr - Find a character in an area of memory. : The memory area : The byte to search for
: The size of the area.

returns the address of the first occurrence of , or NULL if is not found

Definition at line 282 of file string.c.

int memcmp ( const void cs,
const void ct,
size_t  n 
)

memcmp - Compare two areas of memory : One area of memory : Another area of memory : The size of the area.

Definition at line 303 of file string.c.

void* memscan ( void s,
int  c,
size_t  n 
)

memscan - Find a character in an area of memory. : The memory area : The byte to search for
: The size of the area.

returns the address of the first occurrence of , or 1 byte past the area if is not found

Definition at line 332 of file string.c.

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

returns a pointer to

Definition at line 132 of file string.c.

int strcmp ( const char cs,
const char ct 
)

strcmp - Compare two strings : One string : Another string

returns 0 if and are equal, < 0 if is less than > 0 if is greater than

Definition at line 203 of file string.c.

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

returns a pointer to

Definition at line 70 of file string.c.

size_t strlcat ( char dest,
const char src,
size_t  n 
)

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.

Definition at line 154 of file string.c.

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.

Definition at line 94 of file string.c.

size_t strlen ( const char s)

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

returns the length of

Definition at line 44 of file string.c.

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

strncat - Append a length-limited, NUL-terminated string to another : The string to be appended to : The string to append to it
: The maximum numbers of bytes to copy

returns a pointer to

Note that in contrast to strncpy, strncat ensures the result is terminated.

Definition at line 183 of file string.c.

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

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.

Definition at line 116 of file string.c.

size_t strnlen ( const char s,
size_t  n 
)

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

returns the minimum of the length of and

Definition at line 57 of file string.c.

char* strrchr ( const char s,
int  c 
)

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

Definition at line 226 of file string.c.

char* strstr ( const char s1,
const char s2 
)

strstr - Find the first substring in a NUL terminated string : The string to be searched : The string to search for

Definition at line 244 of file string.c.