StringUtil.h 630 B

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