strlib.h 904 B

123456789101112131415161718192021222324252627282930
  1. // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
  2. // For more information, see LICENCE in the main folder
  3. #ifndef _STRLIB_H_
  4. #define _STRLIB_H_
  5. #define J_MAX_MALLOC_SIZE 65535
  6. // String function library.
  7. // code by Jioh L. Jung (ziozzang@4wish.net)
  8. // This code is under license "BSD"
  9. char* jstrescape (char* pt);
  10. char* jstrescapecpy (char* pt,char* spt);
  11. int jmemescapecpy (char* pt,char* spt, int size);
  12. #ifdef __WIN32
  13. #define HAVE_STRTOK_R
  14. #define strtok_r(s,delim,save_ptr) _strtok_r((s),(delim),(save_ptr))
  15. char *_strtok_r(char *s1, const char *s2, char **lasts);
  16. #endif
  17. // custom functions
  18. int remove_control_chars(unsigned char *);
  19. char *trim(char *str, const char *delim);
  20. const char *stristr(const char *haystack, const char *needle);
  21. #if !defined(WIN32) || (defined(_MSC_VER) && _MSC_VER < 1400)
  22. size_t strnlen (const char* string, size_t maxlen);
  23. #endif
  24. #endif /* _STRLIB_H_ */