1
Fork 0
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:
AnotherTest 2020-09-20 18:05:04 +04:30 committed by Andreas Kling
parent 50e9000b40
commit 5fbec2b003
6 changed files with 56 additions and 47 deletions

View file

@ -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;