CUtils.h 1.7 KB

1234567891011121314151617181920212223
  1. #pragma once
  2. #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
  3. #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
  4. #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
  5. #define FNM_NOMATCH 1
  6. #define fnmatch fnmatch_win
  7. class CUtils
  8. {
  9. public:
  10. CUtils();
  11. ~CUtils(void);
  12. int MultiByToUtf8(const char* multi, char*& utf8);
  13. int Utf8ToMultiBy(const char* utf8, char*& multi);
  14. int Utf8ToUnicode(const char* utf8, wchar_t*& unicode);
  15. int UnicodeToUtf8(const wchar_t* unicode, char*& utf8);
  16. int MultiByToUnicode(const char* multi, wchar_t*& unicode);
  17. int UnicodeToMultiBy(const wchar_t* unicode, char*& multi);
  18. int fnmatch_win(const char* pattern, const char* name, int flags = 0);
  19. bool SafeFNMatch(const char* pattern, size_t patt_len, const char* str, size_t str_len);
  20. };