mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 07:34:57 +00:00
AK: Add trim_ascii_whitespace method to String
This commit is contained in:
parent
bc8cad31de
commit
a94c0eea94
2 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue