string.h 881 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __GBLIBC_STRING_H_
  2. #define __GBLIBC_STRING_H_
  3. #include <stdint.h>
  4. #undef CR
  5. #undef LF
  6. #define CR ('\r')
  7. #define LF ('\n')
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. int memcmp(const void* ptr1, const void* ptr2, size_t num);
  12. void* memmove(void* dst, const void* src, size_t n);
  13. void* memcpy(void* dst, const void* src, size_t n);
  14. void* mempcpy(void* dst, const void* src, size_t n);
  15. void* memset(void* dst, int c, size_t n);
  16. int strcmp(const char* s1, const char* s2);
  17. size_t strlen(const char* str);
  18. char* strchr(const char* str, int character);
  19. char* strrchr(const char* str, int character);
  20. char* strchrnul(const char* str, int character);
  21. char* strcpy(char* dst, const char* src);
  22. char* strncpy(char* dst, const char* src, size_t n);
  23. char* stpcpy(char* dst, const char* src);
  24. char* stpncpy(char* dst, const char* src, size_t n);
  25. #ifdef __cplusplus
  26. }
  27. #endif
  28. #endif