mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:48:13 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -50,7 +50,7 @@ EM_JS(void, user_display, (char const* string, u32 length), { globalDisplayToUse
|
|||
template<typename... Args>
|
||||
void display(CheckedFormatString<Args...> format_string, Args const&... args)
|
||||
{
|
||||
auto string = String::formatted(format_string.view(), args...);
|
||||
auto string = DeprecatedString::formatted(format_string.view(), args...);
|
||||
user_display(string.characters(), string.length());
|
||||
}
|
||||
|
||||
|
@ -269,7 +269,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReplObject::print)
|
|||
{
|
||||
auto result = ::print(vm.argument(0));
|
||||
if (result.is_error())
|
||||
return g_vm->throw_completion<JS::InternalError>(String::formatted("Failed to print value: {}", result.error()));
|
||||
return g_vm->throw_completion<JS::InternalError>(DeprecatedString::formatted("Failed to print value: {}", result.error()));
|
||||
|
||||
displayln();
|
||||
|
||||
|
@ -298,7 +298,7 @@ public:
|
|||
// 2.3. Printer(logLevel, args[, options]), https://console.spec.whatwg.org/#printer
|
||||
virtual JS::ThrowCompletionOr<JS::Value> printer(JS::Console::LogLevel log_level, PrinterArguments arguments) override
|
||||
{
|
||||
String indent = String::repeated(" "sv, m_group_stack_depth);
|
||||
DeprecatedString indent = DeprecatedString::repeated(" "sv, m_group_stack_depth);
|
||||
|
||||
if (log_level == JS::Console::LogLevel::Trace) {
|
||||
auto trace = arguments.get<JS::Console::Trace>();
|
||||
|
@ -320,7 +320,7 @@ public:
|
|||
return JS::js_undefined();
|
||||
}
|
||||
|
||||
auto output = String::join(' ', arguments.get<JS::MarkedVector<JS::Value>>());
|
||||
auto output = DeprecatedString::join(' ', arguments.get<JS::MarkedVector<JS::Value>>());
|
||||
switch (log_level) {
|
||||
case JS::Console::LogLevel::Debug:
|
||||
displayln("{}{}", indent, output);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue