string.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. #ifndef __STRING_H_
  10. #define __STRING_H_
  11. #pragma lib "/$M/lib/ape/libap.a"
  12. #include <stddef.h>
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. extern void *memcpy(void *, const void *, size_t);
  17. extern void* memccpy(void*, void*, int, size_t);
  18. extern void *memmove(void *, const void *, size_t);
  19. extern char *strcpy(char *, const char *);
  20. extern char *strncpy(char *, const char *, size_t);
  21. extern char *strcat(char *, const char *);
  22. extern char *strncat(char *, const char *, size_t);
  23. extern int memcmp(const void *, const void *, size_t);
  24. extern int strcmp(const char *, const char *);
  25. extern int strcoll(const char *, const char *);
  26. extern char* strdup(char*);
  27. extern int strncmp(const char *, const char *, size_t);
  28. extern size_t strxfrm(char *, const char *, size_t);
  29. extern void *memchr(const void *, int, size_t);
  30. extern char *strchr(const char *, int);
  31. extern size_t strcspn(const char *, const char *);
  32. extern char *strpbrk(const char *, const char *);
  33. extern char *strrchr(const char *, int);
  34. extern size_t strspn(const char *, const char *);
  35. extern char *strstr(const char *, const char *);
  36. extern char *strtok(char *, const char *);
  37. extern void *memset(void *, int, size_t);
  38. extern char *strerror(int);
  39. extern size_t strlen(const char *);
  40. #ifdef _REENTRANT_SOURCE
  41. extern char *strerror_r(int, const char *, int);
  42. extern char *strtok_r(char *, const char *, char **);
  43. #endif
  44. #ifdef _BSD_EXTENSION
  45. #include <bsd.h>
  46. #endif
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif