mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
AK: Add String{View,}::find(StringView)
I personally mistook `find_first_of(StringView)` to be analogous to this so let's add a `find()` method that actually searches the string.
This commit is contained in:
parent
4fa8435310
commit
39442e6d4f
8 changed files with 70 additions and 11 deletions
|
@ -71,6 +71,7 @@ bool starts_with(const StringView&, const StringView&, CaseSensitivity);
|
|||
bool contains(const StringView&, const StringView&, CaseSensitivity);
|
||||
bool is_whitespace(const StringView&);
|
||||
StringView trim_whitespace(const StringView&, TrimMode mode);
|
||||
Optional<size_t> find(const StringView& haystack, const StringView& needle);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue