mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:17:46 +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
|
@ -138,6 +138,10 @@ public:
|
|||
|
||||
Vector<String> split_limit(char separator, size_t limit, bool keep_empty = false) const;
|
||||
Vector<String> split(char separator, bool keep_empty = false) const;
|
||||
|
||||
Optional<size_t> find(char) const;
|
||||
Optional<size_t> find(const StringView&) const;
|
||||
|
||||
String substring(size_t start) const;
|
||||
String substring(size_t start, size_t length) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue