mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
AK: Add trim_ascii_whitespace method to String
This commit is contained in:
committed by
Jelle Raaijmakers
parent
bc8cad31de
commit
a94c0eea94
@@ -484,6 +484,11 @@ ErrorOr<String> String::trim(StringView code_points_to_trim, TrimMode mode) cons
|
||||
return trim(Utf8View { code_points_to_trim }, mode);
|
||||
}
|
||||
|
||||
ErrorOr<String> String::trim_ascii_whitespace(TrimMode mode) const
|
||||
{
|
||||
return trim(" \n\t\v\f\r"sv, mode);
|
||||
}
|
||||
|
||||
bool String::contains(StringView needle, CaseSensitivity case_sensitivity) const
|
||||
{
|
||||
return StringUtils::contains(bytes_as_string_view(), needle, case_sensitivity);
|
||||
|
||||
Reference in New Issue
Block a user