mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-05 01:10:24 +00:00
LibRegex: Remove unused code from RegexStringView
This commit is contained in:
committed by
Tim Ledbetter
parent
061b457bac
commit
4c491b8920
Notes:
github-actions[bot]
2025-11-26 14:35:20 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/4c491b89202 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6938 Reviewed-by: https://github.com/alimpfard ✅
@@ -179,26 +179,14 @@ public:
|
||||
{
|
||||
return m_view.visit(
|
||||
[](StringView view) { return view.to_byte_string(); },
|
||||
[](Utf16View view) { return view.to_byte_string().release_value_but_fixme_should_propagate_errors(); },
|
||||
[](auto& view) {
|
||||
StringBuilder builder;
|
||||
for (auto it = view.begin(); it != view.end(); ++it)
|
||||
builder.append_code_point(*it);
|
||||
return builder.to_byte_string();
|
||||
});
|
||||
[](Utf16View view) { return view.to_byte_string().release_value_but_fixme_should_propagate_errors(); });
|
||||
}
|
||||
|
||||
ErrorOr<String> to_string() const
|
||||
{
|
||||
return m_view.visit(
|
||||
[](StringView view) { return String::from_utf8(view); },
|
||||
[](Utf16View view) { return view.to_utf8(); },
|
||||
[](auto& view) -> ErrorOr<String> {
|
||||
StringBuilder builder;
|
||||
for (auto it = view.begin(); it != view.end(); ++it)
|
||||
TRY(builder.try_append_code_point(*it));
|
||||
return builder.to_string();
|
||||
});
|
||||
[](Utf16View view) { return view.to_utf8(); });
|
||||
}
|
||||
|
||||
u32 code_point_at(size_t code_unit_index) const
|
||||
|
||||
Reference in New Issue
Block a user