1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00

AK: Add String{,View}::is_whitespace()

+Tests!
This commit is contained in:
AnotherTest 2021-01-03 02:56:02 +03:30 committed by Andreas Kling
parent b795f582cf
commit f3ecea1fb3
5 changed files with 28 additions and 11 deletions

View file

@ -122,6 +122,8 @@ public:
String to_lowercase() const;
String to_uppercase() const;
bool is_whitespace() const { return StringUtils::is_whitespace(*this); }
#ifndef KERNEL
String trim_whitespace(TrimMode mode = TrimMode::Both) const
{