string.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * string.h
  3. *
  4. * Copyright (C) 2017 Aleksandar Andrejevic <theflash@sdf.lonestar.org>
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License as
  8. * published by the Free Software Foundation, either version 3 of the
  9. * License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef _STRING_H_
  20. #define _STRING_H_
  21. #include <mlcrt.h>
  22. #include <stddef.h>
  23. #include <stdint.h>
  24. #include <limits.h>
  25. #include <ctype.h>
  26. char *__CRT_PUBLIC(strcpy)(char *destination, const char *source);
  27. char *__CRT_PUBLIC(strncpy)(char *destination, const char *source, size_t n);
  28. int __CRT_PUBLIC(strcmp)(const char *str1, const char *str2);
  29. int __CRT_PUBLIC(stricmp)(const char *str1, const char *str2);
  30. int __CRT_PUBLIC(strncmp)(const char *str1, const char *str2, size_t n);
  31. char *__CRT_PUBLIC(strstr)(const char *haystack, const char *needle);
  32. char *__CRT_PUBLIC(strchr)(const char *str, char c);
  33. char *__CRT_PUBLIC(strrchr)(const char *str, char c);
  34. char *__CRT_PUBLIC(strcat)(char *destination, const char *source);
  35. char *__CRT_PUBLIC(strncat)(char *destination, const char *source, size_t n);
  36. char *__CRT_PUBLIC(strdup)(const char *source);
  37. char *__CRT_PUBLIC(strtok)(char *str, const char *delimiters);
  38. char *__CRT_PUBLIC(strtok_r)(char *str, const char *delimiters, char **endptr);
  39. size_t __CRT_PUBLIC(strlen)(const char *str);
  40. void __CRT_PUBLIC(strrev)(char *str);
  41. void __CRT_PUBLIC(memset)(void *ptr, int value, size_t n);
  42. void __CRT_PUBLIC(memcpy)(void *destination, const void *source, size_t n);
  43. void __CRT_PUBLIC(memmove)(void *destination, const void *source, size_t n);
  44. int __CRT_PUBLIC(memcmp)(const void *mem1, const void *mem2, size_t n);
  45. #endif