strutil.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /** (c) Nullsoft, Inc. C O N F I D E N T I A L
  2. ** Filename:
  3. ** Project:
  4. ** Description:
  5. ** Author: Ben Allison [email protected]
  6. ** Created:
  7. **/
  8. #ifndef NULLSOFT_STRUTILH
  9. #define NULLSOFT_STRUTILH
  10. #ifndef FILENAME_SIZE
  11. #define FILENAME_SIZE (MAX_PATH * 4)
  12. #endif
  13. #ifndef FILETITLE_SIZE
  14. #define FILETITLE_SIZE 400
  15. #endif
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. char *SkipX(char *str, int count);
  20. wchar_t *SkipXW(wchar_t *str, int count);
  21. void CopyChar(char *dest, const char *src);
  22. ptrdiff_t CopyCharW(wchar_t *dest, const wchar_t *src); // returns number of character copied
  23. void MakeRelativePathName(const wchar_t *filename, wchar_t *outFile, const wchar_t *path);
  24. int FileCompareLogicalN(const wchar_t *str1, ptrdiff_t str1size, const wchar_t *str2, ptrdiff_t str2size);
  25. int FileCompareLogical(const wchar_t *str1, const wchar_t *str2);
  26. int CompareStringLogical(const wchar_t * str1, const wchar_t * str2);
  27. char *GetLastCharacter(char *string);
  28. wchar_t *GetLastCharacterW(wchar_t *string);
  29. const char *GetLastCharacterc(const char *string);
  30. const wchar_t *GetLastCharactercW(const wchar_t *string);
  31. wchar_t *scanstr_backW(wchar_t *str, wchar_t *toscan, wchar_t *defval);
  32. const wchar_t *scanstr_backcW(const wchar_t *str, const wchar_t *toscan, const wchar_t *defval);
  33. char *scanstr_back(char *str, char *toscan, char *defval);
  34. char *scanstr_backc(const char *str, char *toscan, char *defval);
  35. char *extension(const char *fn);
  36. wchar_t *extensionW(const wchar_t *fn);
  37. const char *extensionc(const char *fn);
  38. void extension_ex(const char *fn, char *buf, int buflen);
  39. void extension_exW(const wchar_t *fn, wchar_t *buf, int buflen);
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif