2015-02-16 18:59:11 +01:00
|
|
|
#ifndef _STRING_H
|
|
|
|
#define _STRING_H
|
|
|
|
|
|
|
|
/** @file
|
2005-03-08 19:53:11 +01:00
|
|
|
*
|
2015-02-16 18:59:11 +01:00
|
|
|
* String functions
|
2005-03-08 19:53:11 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-03-02 12:54:40 +01:00
|
|
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
2005-03-08 19:53:11 +01:00
|
|
|
|
2007-01-26 04:25:19 +01:00
|
|
|
#include <stddef.h>
|
2016-04-19 17:30:49 +02:00
|
|
|
|
|
|
|
extern void * generic_memset ( void *dest, int character,
|
|
|
|
size_t len ) __nonnull;
|
|
|
|
extern void * generic_memcpy ( void *dest, const void *src,
|
|
|
|
size_t len ) __nonnull;
|
|
|
|
extern void * generic_memmove ( void *dest, const void *src,
|
|
|
|
size_t len ) __nonnull;
|
|
|
|
|
2007-01-26 04:25:19 +01:00
|
|
|
#include <bits/string.h>
|
2005-03-08 19:53:11 +01:00
|
|
|
|
2015-02-16 18:59:11 +01:00
|
|
|
/* Architecture-specific code is expected to provide these functions,
|
|
|
|
* but may instead explicitly choose to use the generic versions.
|
|
|
|
*/
|
|
|
|
void * memset ( void *dest, int character, size_t len ) __nonnull;
|
2012-11-04 23:50:27 +01:00
|
|
|
void * memcpy ( void *dest, const void *src, size_t len ) __nonnull;
|
2015-02-16 18:59:11 +01:00
|
|
|
void * memmove ( void *dest, const void *src, size_t len ) __nonnull;
|
|
|
|
|
|
|
|
extern int __pure memcmp ( const void *first, const void *second,
|
|
|
|
size_t len ) __nonnull;
|
|
|
|
extern void * __pure memchr ( const void *src, int character,
|
|
|
|
size_t len ) __nonnull;
|
|
|
|
extern void * memswap ( void *dest, void *src, size_t len ) __nonnull;
|
|
|
|
extern int __pure strcmp ( const char *first, const char *second ) __nonnull;
|
|
|
|
extern int __pure strncmp ( const char *first, const char *second,
|
|
|
|
size_t max ) __nonnull;
|
|
|
|
extern size_t __pure strlen ( const char *src ) __nonnull;
|
|
|
|
extern size_t __pure strnlen ( const char *src, size_t max ) __nonnull;
|
|
|
|
extern char * __pure strchr ( const char *src, int character ) __nonnull;
|
|
|
|
extern char * __pure strrchr ( const char *src, int character ) __nonnull;
|
|
|
|
extern char * __pure strstr ( const char *haystack,
|
|
|
|
const char *needle ) __nonnull;
|
|
|
|
extern char * strcpy ( char *dest, const char *src ) __nonnull;
|
|
|
|
extern char * strncpy ( char *dest, const char *src, size_t max ) __nonnull;
|
|
|
|
extern char * strcat ( char *dest, const char *src ) __nonnull;
|
|
|
|
extern char * __malloc strdup ( const char *src ) __nonnull;
|
|
|
|
extern char * __malloc strndup ( const char *src, size_t max ) __nonnull;
|
|
|
|
extern char * __pure strpbrk ( const char *string,
|
|
|
|
const char *delim ) __nonnull;
|
|
|
|
extern char * strsep ( char **string, const char *delim ) __nonnull;
|
2005-03-08 19:53:11 +01:00
|
|
|
|
2015-02-16 18:59:11 +01:00
|
|
|
extern char * __pure strerror ( int errno );
|
2006-12-20 04:35:49 +01:00
|
|
|
|
2015-02-16 18:59:11 +01:00
|
|
|
#endif /* _STRING_H */
|