mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 04:08:08 +00:00
AK: Implement String::find_any_of() and StringView::find_any_of()
This implements StringUtils::find_any_of() and uses it in
String::find_any_of() and StringView::find_any_of(). All uses of
find_{first,last}_of have been replaced with find_any_of(), find() or
find_last(). find_{first,last}_of have subsequently been removed.
This commit is contained in:
committed by
Andreas Kling
parent
17eddf3ac4
commit
9cc35d1ba3
@@ -222,7 +222,7 @@ static StringView parse_custom_property_name(const StringView& value)
|
||||
if (!value.starts_with("var(") || !value.ends_with(")"))
|
||||
return {};
|
||||
// FIXME: Allow for fallback
|
||||
auto first_comma_index = value.find_first_of(",");
|
||||
auto first_comma_index = value.find(',');
|
||||
auto length = value.length();
|
||||
|
||||
auto substring_length = first_comma_index.has_value() ? first_comma_index.value() - 4 - 1 : length - 4 - 1;
|
||||
|
||||
Reference in New Issue
Block a user