mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:17:35 +00:00
AK: Add String starts_with(char) & 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
0e3a9d8e9d
commit
9920d17342
3 changed files with 19 additions and 0 deletions
|
@ -157,6 +157,8 @@ public:
|
|||
|
||||
bool starts_with(const StringView&) const;
|
||||
bool ends_with(const StringView&) const;
|
||||
bool starts_with(char) const;
|
||||
bool ends_with(char) const;
|
||||
|
||||
bool operator==(const String&) const;
|
||||
bool operator!=(const String& other) const { return !(*this == other); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue