mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:37:35 +00:00
AK: Add StringView::starts_with(char) & StringView::ends_with(char)
This is simply meant to be a more efficient implementation in the case that we only need to check a single character.
This commit is contained in:
parent
a406a8c7d2
commit
854f0b9e1a
3 changed files with 20 additions and 0 deletions
|
@ -63,6 +63,8 @@ public:
|
|||
|
||||
bool starts_with(const StringView&) const;
|
||||
bool ends_with(const StringView&) const;
|
||||
bool starts_with(char) const;
|
||||
bool ends_with(char) const;
|
||||
|
||||
StringView substring_view(size_t start, size_t length) const;
|
||||
Vector<StringView> split_view(char, bool keep_empty = false) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue