feat add StartsWith,EndsWith

This commit is contained in:
tqcq
2024-03-03 17:19:11 +08:00
parent 333281ec06
commit d048a2676c
2 changed files with 16 additions and 0 deletions

View File

@@ -20,6 +20,8 @@ std::string TrimLeft(const std::string &str,
const std::string &chars = " \t\n\r");
std::string TrimRight(const std::string &str,
const std::string &chars = " \t\n\r");
bool EndsWith(const std::string &str, const std::string &suffix);
bool StartsWith(const std::string &str, const std::string &prefix);
}// namespace sled
#endif// SLED_STRINGS_UTILS_H