mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
AK: Add StringView::count(char)
This commit is contained in:
parent
b40ab55830
commit
3556c27d2d
3 changed files with 16 additions and 0 deletions
|
@ -330,6 +330,11 @@ public:
|
|||
return StringUtils::count(*this, needle);
|
||||
}
|
||||
|
||||
[[nodiscard]] size_t count(char needle) const
|
||||
{
|
||||
return StringUtils::count(*this, needle);
|
||||
}
|
||||
|
||||
template<typename... Ts>
|
||||
[[nodiscard]] ALWAYS_INLINE constexpr bool is_one_of(Ts&&... strings) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue