diff --git a/include/blt/std/string.h b/include/blt/std/string.h index e92e21a..f20f2fe 100755 --- a/include/blt/std/string.h +++ b/include/blt/std/string.h @@ -89,6 +89,13 @@ namespace blt::string return true; } + static inline bool contains(const std::string& string, const char search) + { + std::ranges::any_of(string, [search](const char c) -> bool { + return c == search; + }); + } + static inline bool contains(const std::string& string, const std::string& search) { if (search.length() > string.length())