mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
AK+Everywhere: Change StringView case conversions to return String
There's a bit of a UTF-8 assumption with this change. But nearly every caller of these methods were immediately creating a String from the resulting ByteString anyways.
This commit is contained in:
parent
05627b6f45
commit
0a256b0a9a
Notes:
github-actions[bot]
2025-04-07 15:45:50 +00:00
Author: https://github.com/trflynn89
Commit: 0a256b0a9a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4253
15 changed files with 57 additions and 56 deletions
|
@ -73,6 +73,12 @@ public:
|
|||
[[nodiscard]] ALWAYS_INLINE FlatPtr raw(Badge<FlyString>) const { return bit_cast<FlatPtr>(m_impl); }
|
||||
[[nodiscard]] ALWAYS_INLINE FlatPtr raw(Badge<String>) const { return bit_cast<FlatPtr>(m_impl); }
|
||||
|
||||
template<typename Func>
|
||||
ALWAYS_INLINE ErrorOr<void> replace_with_new_string(Badge<StringView>, size_t byte_count, Func&& callback)
|
||||
{
|
||||
return replace_with_new_string(byte_count, forward<Func>(callback));
|
||||
}
|
||||
|
||||
protected:
|
||||
template<typename Func>
|
||||
ErrorOr<void> replace_with_new_string(size_t byte_count, Func&& callback)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue