string.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* string.h */
  2. /*
  3. * Copyright (c) 2014 Wind River Systems, Inc.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0
  6. */
  7. #ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_STRING_H_
  8. #define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_STRING_H_
  9. #include <stddef.h>
  10. #include <bits/restrict.h>
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. extern char *strcpy(char *_MLIBC_RESTRICT d, const char *_MLIBC_RESTRICT s);
  15. extern char *strncpy(char *_MLIBC_RESTRICT d, const char *_MLIBC_RESTRICT s,
  16. size_t n);
  17. extern char *strchr(const char *s, int c);
  18. extern char *strrchr(const char *s, int c);
  19. extern size_t strlen(const char *s);
  20. extern size_t strnlen(const char *s, size_t maxlen);
  21. extern int strcmp(const char *s1, const char *s2);
  22. extern int strncmp(const char *s1, const char *s2, size_t n);
  23. extern char *strtok_r(char *str, const char *sep, char **state);
  24. extern char *strcat(char *_MLIBC_RESTRICT dest,
  25. const char *_MLIBC_RESTRICT src);
  26. extern char *strncat(char *_MLIBC_RESTRICT dest, const char *_MLIBC_RESTRICT src,
  27. size_t n);
  28. extern char *strstr(const char *s, const char *find);
  29. extern size_t strspn(const char *s, const char *accept);
  30. extern size_t strcspn(const char *s, const char *reject);
  31. extern int memcmp(const void *m1, const void *m2, size_t n);
  32. extern void *memmove(void *d, const void *s, size_t n);
  33. extern void *memcpy(void *_MLIBC_RESTRICT d, const void *_MLIBC_RESTRICT s,
  34. size_t n);
  35. extern void *memset(void *buf, int c, size_t n);
  36. extern void *memchr(const void *s, int c, size_t n);
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif /* ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_STRING_H_ */