mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:37:46 +00:00
LibJS: Rename Utf16String::to_utf8 to to_deprecated_string
This commit is contained in:
parent
ca655f5e7d
commit
4eb5eb2080
3 changed files with 3 additions and 3 deletions
|
@ -70,7 +70,7 @@ ThrowCompletionOr<DeprecatedString> PrimitiveString::deprecated_string() const
|
||||||
|
|
||||||
if (!has_deprecated_string()) {
|
if (!has_deprecated_string()) {
|
||||||
VERIFY(has_utf16_string());
|
VERIFY(has_utf16_string());
|
||||||
m_deprecated_string = TRY(m_utf16_string->to_utf8(vm()));
|
m_deprecated_string = TRY(m_utf16_string->to_deprecated_string(vm()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return *m_deprecated_string;
|
return *m_deprecated_string;
|
||||||
|
|
|
@ -102,7 +102,7 @@ Utf16View Utf16String::substring_view(size_t code_unit_offset) const
|
||||||
return view().substring_view(code_unit_offset);
|
return view().substring_view(code_unit_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
ThrowCompletionOr<DeprecatedString> Utf16String::to_utf8(VM& vm) const
|
ThrowCompletionOr<DeprecatedString> Utf16String::to_deprecated_string(VM& vm) const
|
||||||
{
|
{
|
||||||
return TRY_OR_THROW_OOM(vm, view().to_deprecated_string(Utf16View::AllowInvalidCodeUnits::Yes));
|
return TRY_OR_THROW_OOM(vm, view().to_deprecated_string(Utf16View::AllowInvalidCodeUnits::Yes));
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
Utf16View substring_view(size_t code_unit_offset, size_t code_unit_length) const;
|
Utf16View substring_view(size_t code_unit_offset, size_t code_unit_length) const;
|
||||||
Utf16View substring_view(size_t code_unit_offset) const;
|
Utf16View substring_view(size_t code_unit_offset) const;
|
||||||
|
|
||||||
ThrowCompletionOr<DeprecatedString> to_utf8(VM&) const;
|
ThrowCompletionOr<DeprecatedString> to_deprecated_string(VM&) const;
|
||||||
u16 code_unit_at(size_t index) const;
|
u16 code_unit_at(size_t index) const;
|
||||||
|
|
||||||
size_t length_in_code_units() const;
|
size_t length_in_code_units() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue