mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
AK: Replace the boolean parameter of StringView::lines with a named enum
This commit is contained in:
@@ -68,12 +68,12 @@ Vector<StringView> StringView::split_view(StringView separator, SplitBehavior sp
|
||||
return parts;
|
||||
}
|
||||
|
||||
Vector<StringView> StringView::lines(bool consider_cr) const
|
||||
Vector<StringView> StringView::lines(ConsiderCarriageReturn consider_carriage_return) const
|
||||
{
|
||||
if (is_empty())
|
||||
return {};
|
||||
|
||||
if (!consider_cr)
|
||||
if (consider_carriage_return == ConsiderCarriageReturn::No)
|
||||
return split_view('\n', SplitBehavior::KeepEmpty);
|
||||
|
||||
Vector<StringView> v;
|
||||
|
||||
Reference in New Issue
Block a user