mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
AK: Move trim_whitespace() into StringUtils and add it to StringView
No behaviour change; also patches use of `String::TrimMode` in LibJS.
This commit is contained in:
parent
50e9000b40
commit
5fbec2b003
6 changed files with 56 additions and 47 deletions
|
@ -91,6 +91,8 @@ public:
|
|||
bool contains(const StringView&) const;
|
||||
bool equals_ignoring_case(const StringView& other) const;
|
||||
|
||||
StringView trim_whitespace(TrimMode mode = TrimMode::Both) const { return StringUtils::trim_whitespace(*this, mode); }
|
||||
|
||||
Optional<size_t> find_first_of(char) const;
|
||||
Optional<size_t> find_first_of(const StringView&) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue