string.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-01-12 Meco Man The first version.
  9. */
  10. #ifndef __POSIX_STRING_H__
  11. #define __POSIX_STRING_H__
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #include <stddef.h>
  16. #include <string.h>
  17. void bzero(void * s, size_t n);
  18. void bcopy(const void * src, void * dest, size_t n);
  19. int bcmp(const void * s1, const void * s2, size_t n);
  20. void explicit_bzero(void * s, size_t n);
  21. char *index(const char * s, int c);
  22. char *rindex(const char * s, int c);
  23. int ffs(int i);
  24. int ffsl(long i);
  25. int ffsll(long long i);
  26. void *memrchr(const void* ptr, int ch, size_t pos);
  27. size_t strnlen(const char *s, size_t maxlen);
  28. char* strchrnul(const char *s, int c);
  29. int strcasecmp(const char * s1, const char * s2);
  30. int strncasecmp(const char * s1, const char * s2, size_t n);
  31. char *strdup(const char *s);
  32. char *strndup(const char *s, size_t size);
  33. char *strtok_r(char *str, const char *delim, char **saveptr);
  34. #ifdef __cplusplus
  35. }
  36. #endif
  37. #endif /* __POSIX_STRING_H__ */