mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
AK: Add an overload of String::find_byte_offset for StringView
This commit is contained in:
parent
38b4e938b7
commit
c35b1371a3
3 changed files with 55 additions and 2 deletions
|
@ -133,6 +133,7 @@ public:
|
|||
ErrorOr<Vector<String>> split(u32 separator, SplitBehavior = SplitBehavior::Nothing) const;
|
||||
|
||||
Optional<size_t> find_byte_offset(u32 code_point, size_t from_byte_offset = 0) const;
|
||||
Optional<size_t> find_byte_offset(StringView substring, size_t from_byte_offset = 0) const;
|
||||
|
||||
[[nodiscard]] bool operator==(String const&) const;
|
||||
[[nodiscard]] bool operator!=(String const& other) const { return !(*this == other); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue