mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 22:52:22 +02:00
AK+Everywhere: Turn bool keep_empty to an enum in split* functions
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 07:09:53 +09:00
Author: https://github.com/demostanis Commit: https://github.com/SerenityOS/serenity/commit/3e8b5ac920 Pull-request: https://github.com/SerenityOS/serenity/pull/15750 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/davidot Reviewed-by: https://github.com/linusg ✅
@@ -3577,7 +3577,7 @@ String StringValue::resolve_as_string(RefPtr<Shell> shell)
|
||||
Vector<String> StringValue::resolve_as_list(RefPtr<Shell> shell)
|
||||
{
|
||||
if (is_list()) {
|
||||
auto parts = StringView(m_string).split_view(m_split, m_keep_empty);
|
||||
auto parts = StringView(m_string).split_view(m_split, m_keep_empty ? SplitBehavior::KeepEmpty : SplitBehavior::Nothing);
|
||||
Vector<String> result;
|
||||
result.ensure_capacity(parts.size());
|
||||
for (auto& part : parts)
|
||||
|
||||
Reference in New Issue
Block a user