add string char contains overload
parent
ce642a30b7
commit
4f4ed1918b
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue