VmStringUtils.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #include "il2cpp-config.h"
  3. #include <string>
  4. namespace il2cpp
  5. {
  6. namespace utils
  7. {
  8. class LIBIL2CPP_CODEGEN_API VmStringUtils
  9. {
  10. public:
  11. static Il2CppChar Utf16ToLower(Il2CppChar c);
  12. static bool CaseSensitiveEquals(Il2CppString* left, const char* right);
  13. static bool CaseSensitiveEquals(const char* left, const char* right);
  14. static bool CaseInsensitiveEquals(Il2CppString* left, const char* right);
  15. static bool CaseInsensitiveEquals(const char* left, const char* right);
  16. struct CaseSensitiveComparer
  17. {
  18. bool operator()(const std::string& left, const std::string& right) const;
  19. bool operator()(const std::string& left, const char* right) const;
  20. bool operator()(const char* left, const std::string& right) const;
  21. bool operator()(const char* left, const char* right) const;
  22. };
  23. struct CaseInsensitiveComparer
  24. {
  25. bool operator()(const std::string& left, const std::string& right) const;
  26. bool operator()(const std::string& left, const char* right) const;
  27. bool operator()(const char* left, const std::string& right) const;
  28. bool operator()(const char* left, const char* right) const;
  29. };
  30. };
  31. } // namespace utils
  32. } // namespace il2cpp