StringUtil.h 518 B

1234567891011121314151617181920212223
  1. #ifndef STRINGUTIL_H_
  2. #define STRINGUTIL_H_
  3. #include <string>
  4. namespace gameplay
  5. {
  6. bool startsWith(const char* str, const char* prefix, bool ignoreCase = true);
  7. bool endsWith(const char* str, const char* suffix, bool ignoreCase = true);
  8. /**
  9. * Return true if the strings are equal. Case sensitive.
  10. */
  11. bool equals(const std::string& a, const char* b);
  12. /**
  13. * Returns true if the strings are equal. Case insensitive.
  14. */
  15. bool equalsIgnoreCase(const std::string& a, const char* b);
  16. }
  17. #endif