string.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 <stddef.h>
  22. #include <stdint.h>
  23. #include <limits.h>
  24. #include <ctype.h>
  25. char *strcpy(char *destination, const char *source);
  26. char *strncpy(char *destination, const char *source, size_t n);
  27. int strcmp(const char *str1, const char *str2);
  28. int stricmp(const char *str1, const char *str2);
  29. int strncmp(const char *str1, const char *str2, size_t n);
  30. char *strstr(const char *haystack, const char *needle);
  31. char *strchr(const char *str, char c);
  32. char *strrchr(const char *str, char c);
  33. char *strcat(char *destination, const char *source);
  34. char *strncat(char *destination, const char *source, size_t n);
  35. char *strdup(const char *source);
  36. char *strtok(char *str, const char *delimiters);
  37. char *strtok_r(char *str, const char *delimiters, char **endptr);
  38. size_t strlen(const char *str);
  39. void strrev(char *str);
  40. void memset(void *ptr, int value, size_t n);
  41. void memcpy(void *destination, const void *source, size_t n);
  42. void memmove(void *destination, const void *source, size_t n);
  43. int memcmp(const void *mem1, const void *mem2, size_t n);
  44. #endif