You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add constructor for String that takes span<char8_t>
https://bugs.webkit.org/show_bug.cgi?id=301739
rdar://163764627
Reviewed by Sam Weinig.
* Source/WTF/wtf/Logger.h:
(WTF::LogArgument::toString): Added overload that takes std::span<const char8_t>.
* Source/WTF/wtf/PrintStream.cpp:
(WTF::printInternal): Added overload that takes std::span<const char8_t>.
* Source/WTF/wtf/PrintStream.h: Ditto.
* Source/WTF/wtf/text/StringImpl.cpp:
(WTF::StringImpl::create): Added overload that takes std::span<const char8_t>.
* Source/WTF/wtf/text/StringImpl.h: Ditto.
* Source/WTF/wtf/text/WTFString.cpp:
(WTF::String::String): Added overload that takes std::span<const char8_t>.
(WTF::fromUTF8Impl): Deleted.
(WTF::String::fromUTF8): Changed to call the constructor.
(WTF::String::fromUTF8ReplacingInvalidSequences): Moved code here from the
fromUTF8Impl function.
(WTF::String::fromUTF8WithLatin1Fallback): Call the constructor rather than
the fromUTF8 function.
* Source/WTF/wtf/text/WTFString.h: Added constructor that takes
std::span<const char8_t>.
Canonical link: https://commits.webkit.org/302417@main
Signed-off-by: Xabier Rodriguez Calvar <calvaris@igalia.com>
0 commit comments