mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 00:08:55 +00:00
AK: Add Utf16View::to_utf8 to convert the view to a UTF-8 AK::String
This commit is contained in:
parent
d0403ec14f
commit
2eacc7aec1
Notes:
sideshowbarker
2024-07-17 02:14:39 +09:00
Author: https://github.com/trflynn89
Commit: 2eacc7aec1
Pull-request: https://github.com/SerenityOS/serenity/pull/16926
3 changed files with 17 additions and 10 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <AK/Forward.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/Span.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Types.h>
|
||||
#include <AK/Vector.h>
|
||||
|
||||
|
@ -76,6 +77,7 @@ public:
|
|||
};
|
||||
|
||||
ErrorOr<DeprecatedString> to_deprecated_string(AllowInvalidCodeUnits = AllowInvalidCodeUnits::No) const;
|
||||
ErrorOr<String> to_utf8(AllowInvalidCodeUnits = AllowInvalidCodeUnits::No) const;
|
||||
|
||||
bool is_null() const { return m_code_units.is_null(); }
|
||||
bool is_empty() const { return m_code_units.is_empty(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue