string.h 917 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #include <stddef.h>
  3. #include <ctype.h>
  4. #include <string.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #if !defined(__FreeBSD__) && !defined(__APPLE__)
  9. size_t strlcpy(char* dst, const char* src, size_t len);
  10. size_t strlcat(char* dst, const char* src, size_t len);
  11. #endif
  12. #if (!defined(__linux__) && !defined(__FreeBSD__) && !defined(__APPLE__)) || (defined(__ANDROID__) && __ANDROID_API__ < 21)
  13. char* stpcpy(char* dst, const char* src);
  14. #endif
  15. #if !defined(_MSC_VER)
  16. #define stricmp strcasecmp
  17. #define strnicmp strncasecmp
  18. char* strlwr(char*);
  19. char* strupr(char*);
  20. #else // _MSC_VER
  21. #define strcasecmp stricmp
  22. #define strncasecmp strnicmp
  23. char* strcasestr(const char* s1, const char* s2);
  24. char* strsep(char** stringp, const char* delim);
  25. #endif // _MSC_VER
  26. #if defined(_MSC_VER) || defined(__APPLE__)
  27. void* memrchr(const void* s, int c, size_t n);
  28. #endif
  29. #ifdef __cplusplus
  30. } //extern "C"
  31. #endif