string.h 435 B

123456789101112131415161718192021222324252627
  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. void* memcpy(void* dst, const void* src, size_t n);
  12. void* memset(void* dst, int c, size_t n);
  13. int strcmp(const char* s1, const char* s2);
  14. size_t strlen(const char* str);
  15. char* strncpy(char* dst, const char* src, size_t n);
  16. #ifdef __cplusplus
  17. }
  18. #endif
  19. #endif