فهرست منبع

AK: Remove StringBuilder::build() in favor of to_deprecated_string()

Having an alias function that only wraps another one is silly, and
keeping the more obvious name should flush out more uses of deprecated
strings.
No behavior change.
Linus Groh 2 سال پیش
والد
کامیت
6e7459322d
100فایلهای تغییر یافته به همراه167 افزوده شده و 173 حذف شده
  1. 1 1
      AK/DeprecatedString.h
  2. 1 1
      AK/Hex.cpp
  3. 1 1
      AK/JsonArray.h
  4. 2 2
      AK/JsonObject.h
  5. 1 1
      AK/SourceGenerator.h
  6. 0 5
      AK/StringBuilder.cpp
  7. 0 1
      AK/StringBuilder.h
  8. 1 1
      AK/StringUtils.cpp
  9. 1 1
      AK/URL.cpp
  10. 1 1
      Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp
  11. 1 1
      Meta/Lagom/Tools/CodeGenerators/LibEDID/GeneratePnpIDs.cpp
  12. 1 1
      Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateDateTimeFormatData.cpp
  13. 1 1
      Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateLocaleData.cpp
  14. 2 2
      Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateNumberFormatData.cpp
  15. 1 1
      Meta/Lagom/Tools/CodeGenerators/LibLocale/GeneratePluralRulesData.cpp
  16. 1 1
      Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateRelativeTimeFormatData.cpp
  17. 2 2
      Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateEmojiData.cpp
  18. 1 1
      Tests/AK/TestDeprecatedString.cpp
  19. 1 1
      Tests/Kernel/fuzz-syscalls.cpp
  20. 2 2
      Tests/LibC/TestRealpath.cpp
  21. 1 1
      Tests/LibC/TestSnprintf.cpp
  22. 1 1
      Tests/LibC/TestStrlcpy.cpp
  23. 6 6
      Tests/LibRegex/Regex.cpp
  24. 5 5
      Tests/LibRegex/RegexLibC.cpp
  25. 2 2
      Tests/LibSQL/TestSqlDatabase.cpp
  26. 8 8
      Tests/LibSQL/TestSqlExpressionParser.cpp
  27. 2 2
      Userland/Applications/Browser/CookieJar.cpp
  28. 1 1
      Userland/Applications/Browser/Tab.cpp
  29. 1 1
      Userland/Applications/CharacterMap/CharacterSearchWidget.cpp
  30. 2 2
      Userland/Applications/CrashReporter/main.cpp
  31. 2 2
      Userland/Applications/FileManager/main.cpp
  32. 1 1
      Userland/Applications/SpaceAnalyzer/main.cpp
  33. 1 1
      Userland/Applications/Spreadsheet/Cell.cpp
  34. 1 1
      Userland/Applications/Spreadsheet/CellType/Format.cpp
  35. 1 1
      Userland/Applications/Spreadsheet/Spreadsheet.cpp
  36. 1 1
      Userland/DevTools/HackStudio/Editor.cpp
  37. 1 1
      Userland/DevTools/Profiler/DisassemblyModel.cpp
  38. 1 1
      Userland/Games/Chess/ChessWidget.cpp
  39. 1 1
      Userland/Libraries/LibC/semaphore.cpp
  40. 1 1
      Userland/Libraries/LibC/stdlib.cpp
  41. 1 1
      Userland/Libraries/LibC/syslog.cpp
  42. 1 1
      Userland/Libraries/LibC/time.cpp
  43. 1 1
      Userland/Libraries/LibCards/CardStack.h
  44. 3 3
      Userland/Libraries/LibChess/Chess.cpp
  45. 7 7
      Userland/Libraries/LibChess/UCICommand.cpp
  46. 1 1
      Userland/Libraries/LibCodeComprehension/Shell/ShellComprehensionEngine.cpp
  47. 2 2
      Userland/Libraries/LibCore/Account.cpp
  48. 1 1
      Userland/Libraries/LibCore/ArgsParser.cpp
  49. 1 1
      Userland/Libraries/LibCore/DateTime.cpp
  50. 1 1
      Userland/Libraries/LibCore/File.cpp
  51. 2 2
      Userland/Libraries/LibCoredump/Backtrace.cpp
  52. 2 2
      Userland/Libraries/LibCpp/SemanticSyntaxHighlighter.cpp
  53. 1 1
      Userland/Libraries/LibCrypto/Authentication/HMAC.h
  54. 2 2
      Userland/Libraries/LibCrypto/Cipher/AES.cpp
  55. 1 1
      Userland/Libraries/LibCrypto/Cipher/Mode/CBC.h
  56. 1 1
      Userland/Libraries/LibCrypto/Cipher/Mode/CTR.h
  57. 1 1
      Userland/Libraries/LibCrypto/Cipher/Mode/GCM.h
  58. 2 2
      Userland/Libraries/LibEDID/EDID.cpp
  59. 1 1
      Userland/Libraries/LibGUI/GML/AutocompleteProvider.cpp
  60. 1 1
      Userland/Libraries/LibGUI/TextDocument.cpp
  61. 1 1
      Userland/Libraries/LibGemini/Document.cpp
  62. 4 4
      Userland/Libraries/LibGemini/Line.cpp
  63. 1 1
      Userland/Libraries/LibHTTP/Job.cpp
  64. 1 1
      Userland/Libraries/LibIDL/IDLParser.cpp
  65. 3 3
      Userland/Libraries/LibIMAP/Client.cpp
  66. 5 5
      Userland/Libraries/LibIMAP/Objects.cpp
  67. 1 1
      Userland/Libraries/LibIMAP/Parser.cpp
  68. 1 1
      Userland/Libraries/LibJS/AST.cpp
  69. 1 1
      Userland/Libraries/LibJS/Bytecode/Pass/MergeBlocks.cpp
  70. 1 1
      Userland/Libraries/LibJS/ParserError.cpp
  71. 1 1
      Userland/Libraries/LibJS/Runtime/Date.cpp
  72. 1 1
      Userland/Libraries/LibJS/Runtime/Error.cpp
  73. 4 4
      Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
  74. 1 1
      Userland/Libraries/LibJS/Runtime/Intl/DurationFormatPrototype.cpp
  75. 1 1
      Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp
  76. 1 1
      Userland/Libraries/LibJS/Runtime/RegExpObject.cpp
  77. 2 2
      Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp
  78. 1 1
      Userland/Libraries/LibJS/Runtime/StringConstructor.cpp
  79. 1 1
      Userland/Libraries/LibJS/Token.cpp
  80. 3 3
      Userland/Libraries/LibLine/Editor.cpp
  81. 3 3
      Userland/Libraries/LibLine/InternalFunctions.cpp
  82. 1 1
      Userland/Libraries/LibLocale/DateTimeFormat.cpp
  83. 1 1
      Userland/Libraries/LibMarkdown/BlockQuote.cpp
  84. 3 3
      Userland/Libraries/LibMarkdown/CodeBlock.cpp
  85. 2 2
      Userland/Libraries/LibMarkdown/CommentBlock.cpp
  86. 2 2
      Userland/Libraries/LibMarkdown/ContainerBlock.cpp
  87. 2 2
      Userland/Libraries/LibMarkdown/Document.cpp
  88. 1 1
      Userland/Libraries/LibMarkdown/Heading.cpp
  89. 3 3
      Userland/Libraries/LibMarkdown/List.cpp
  90. 1 1
      Userland/Libraries/LibMarkdown/Paragraph.cpp
  91. 3 3
      Userland/Libraries/LibMarkdown/Table.cpp
  92. 4 4
      Userland/Libraries/LibMarkdown/Text.cpp
  93. 1 1
      Userland/Libraries/LibRegex/RegexMatch.h
  94. 1 1
      Userland/Libraries/LibRegex/RegexMatcher.cpp
  95. 3 3
      Userland/Libraries/LibRegex/RegexParser.cpp
  96. 2 2
      Userland/Libraries/LibSQL/AST/Expression.cpp
  97. 1 1
      Userland/Libraries/LibSQL/AST/Lexer.cpp
  98. 1 1
      Userland/Libraries/LibSQL/Result.cpp
  99. 1 1
      Userland/Libraries/LibSQL/TreeNode.cpp
  100. 1 1
      Userland/Libraries/LibSQL/Tuple.cpp

+ 1 - 1
AK/DeprecatedString.h

@@ -106,7 +106,7 @@ public:
     {
         StringBuilder builder;
         builder.join(separator, collection, fmtstr);
-        return builder.build();
+        return builder.to_deprecated_string();
     }
 
     [[nodiscard]] bool matches(StringView mask, CaseSensitivity = CaseSensitivity::CaseInsensitive) const;

+ 1 - 1
AK/Hex.cpp

@@ -52,7 +52,7 @@ DeprecatedString encode_hex(const ReadonlyBytes input)
     for (auto ch : input)
         output.appendff("{:02x}", ch);
 
-    return output.build();
+    return output.to_deprecated_string();
 }
 #endif
 

+ 1 - 1
AK/JsonArray.h

@@ -109,7 +109,7 @@ inline typename Builder::OutputType JsonArray::serialized() const
 {
     Builder builder;
     serialize(builder);
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 }

+ 2 - 2
AK/JsonObject.h

@@ -139,7 +139,7 @@ inline typename Builder::OutputType JsonObject::serialized() const
 {
     Builder builder;
     serialize(builder);
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 template<typename Builder>
@@ -190,7 +190,7 @@ inline typename Builder::OutputType JsonValue::serialized() const
 {
     Builder builder;
     serialize(builder);
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 }

+ 1 - 1
AK/SourceGenerator.h

@@ -57,7 +57,7 @@ public:
     }
 
     StringView as_string_view() const { return m_builder.string_view(); }
-    DeprecatedString as_string() const { return m_builder.build(); }
+    DeprecatedString as_string() const { return m_builder.to_deprecated_string(); }
 
     void append(StringView pattern)
     {

+ 0 - 5
AK/StringBuilder.cpp

@@ -118,11 +118,6 @@ DeprecatedString StringBuilder::to_deprecated_string() const
     return DeprecatedString((char const*)data(), length());
 }
 
-DeprecatedString StringBuilder::build() const
-{
-    return to_deprecated_string();
-}
-
 ErrorOr<String> StringBuilder::to_string() const
 {
     return String::from_utf8(string_view());

+ 0 - 1
AK/StringBuilder.h

@@ -62,7 +62,6 @@ public:
     }
 
 #ifndef KERNEL
-    [[nodiscard]] DeprecatedString build() const;
     [[nodiscard]] DeprecatedString to_deprecated_string() const;
     ErrorOr<String> to_string() const;
 #endif

+ 1 - 1
AK/StringUtils.cpp

@@ -546,7 +546,7 @@ DeprecatedString replace(StringView str, StringView needle, StringView replaceme
         last_position = position + needle.length();
     }
     replaced_string.append(str.substring_view(last_position, str.length() - last_position));
-    return replaced_string.build();
+    return replaced_string.to_deprecated_string();
 }
 
 ErrorOr<String> replace(String const& haystack, StringView needle, StringView replacement, ReplaceMode replace_mode)

+ 1 - 1
AK/URL.cpp

@@ -348,7 +348,7 @@ DeprecatedString URL::serialize_origin() const
     builder.append(m_host);
     if (m_port.has_value())
         builder.appendff(":{}", *m_port);
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 bool URL::equals(URL const& other, ExcludeFragment exclude_fragments) const

+ 1 - 1
Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp

@@ -371,7 +371,7 @@ public:)~~~");
             builder.append(", "sv);
     }
 
-    message_generator.set("message.constructor_call_parameters", builder.build());
+    message_generator.set("message.constructor_call_parameters", builder.to_deprecated_string());
     message_generator.appendln(R"~~~(
         return make<@message.pascal_name@>(@message.constructor_call_parameters@);
     })~~~");

+ 1 - 1
Meta/Lagom/Tools/CodeGenerators/LibEDID/GeneratePnpIDs.cpp

@@ -86,7 +86,7 @@ static ErrorOr<DeprecatedString> decode_html_entities(StringView const& str)
 
         start = entity_end.value() + 1;
     }
-    return decoded_str.build();
+    return decoded_str.to_deprecated_string();
 }
 
 static ErrorOr<ApprovalDate> parse_approval_date(StringView const& str)

+ 1 - 1
Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateDateTimeFormatData.cpp

@@ -1667,7 +1667,7 @@ static ErrorOr<void> parse_all_locales(DeprecatedString core_path, DeprecatedStr
         if (auto region = cldr.unique_strings.get(parsed_locale.region); !region.is_empty())
             builder.appendff("-{}", region);
 
-        return builder.build();
+        return builder.to_deprecated_string();
     };
 
     while (dates_iterator.has_next()) {

+ 1 - 1
Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateLocaleData.cpp

@@ -936,7 +936,7 @@ static ErrorOr<void> parse_all_locales(DeprecatedString bcp47_path, DeprecatedSt
         if (auto region = cldr.unique_strings.get(parsed_locale.region); !region.is_empty())
             builder.appendff("-{}", region);
 
-        return builder.build();
+        return builder.to_deprecated_string();
     };
 
     while (identity_iterator.has_next()) {

+ 2 - 2
Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateNumberFormatData.cpp

@@ -86,7 +86,7 @@ struct AK::Formatter<NumberFormat> : Formatter<FormatString> {
             format.zero_format_index,
             format.positive_format_index,
             format.negative_format_index,
-            identifier_indices.build());
+            identifier_indices.to_deprecated_string());
     }
 };
 
@@ -718,7 +718,7 @@ static ErrorOr<void> parse_all_locales(DeprecatedString core_path, DeprecatedStr
         if (auto region = cldr.unique_strings.get(parsed_locale.region); !region.is_empty())
             builder.appendff("-{}", region);
 
-        return builder.build();
+        return builder.to_deprecated_string();
     };
 
     while (numbers_iterator.has_next()) {

+ 1 - 1
Meta/Lagom/Tools/CodeGenerators/LibLocale/GeneratePluralRulesData.cpp

@@ -410,7 +410,7 @@ static ErrorOr<void> parse_all_locales(DeprecatedString core_path, DeprecatedStr
         if (auto region = cldr.unique_strings.get(parsed_locale.region); !region.is_empty())
             builder.appendff("-{}", region);
 
-        return builder.build();
+        return builder.to_deprecated_string();
     };
 
     while (identity_iterator.has_next()) {

+ 1 - 1
Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateRelativeTimeFormatData.cpp

@@ -150,7 +150,7 @@ static ErrorOr<void> parse_all_locales(DeprecatedString dates_path, CLDR& cldr)
         if (auto region = cldr.unique_strings.get(parsed_locale.region); !region.is_empty())
             builder.appendff("-{}", region);
 
-        return builder.build();
+        return builder.to_deprecated_string();
     };
 
     while (dates_iterator.has_next()) {

+ 2 - 2
Meta/Lagom/Tools/CodeGenerators/LibUnicode/GenerateEmojiData.cpp

@@ -45,7 +45,7 @@ static void set_image_path_for_emoji(StringView emoji_resource_path, Emoji& emoj
         builder.appendff("U+{:X}", code_point);
     }
 
-    auto path = DeprecatedString::formatted("{}/{}.png", emoji_resource_path, builder.build());
+    auto path = DeprecatedString::formatted("{}/{}.png", emoji_resource_path, builder.to_deprecated_string());
     if (Core::File::exists(path))
         emoji.image_path = move(path);
 }
@@ -153,7 +153,7 @@ static ErrorOr<void> parse_emoji_serenity_data(Core::Stream::BufferedFile& file,
             }
         });
 
-        auto name = builder.build();
+        auto name = builder.to_deprecated_string();
         if (!any_of(name, is_ascii_lower_alpha))
             name = name.to_titlecase();
 

+ 1 - 1
Tests/AK/TestDeprecatedString.cpp

@@ -252,7 +252,7 @@ TEST_CASE(builder_zero_initial_capacity)
 {
     StringBuilder builder(0);
     builder.append(""sv);
-    auto built = builder.build();
+    auto built = builder.to_deprecated_string();
     EXPECT_EQ(built.is_null(), false);
     EXPECT_EQ(built.length(), 0u);
 }

+ 1 - 1
Tests/Kernel/fuzz-syscalls.cpp

@@ -101,7 +101,7 @@ static void do_weird_call(size_t attempt, int syscall_fn, size_t arg1, size_t ar
         builder.appendff("{:p}", fake_params[i]);
     }
     builder.append(']');
-    dbgln("{}", builder.build());
+    dbgln("{}", builder.to_deprecated_string());
 
     // Actually do the syscall ('fake_params' is passed indirectly, if any of arg1, arg2, or arg3 point to it.
     int rc = syscall(Syscall::Function(syscall_fn), arg1, arg2, arg3);

+ 2 - 2
Tests/LibC/TestRealpath.cpp

@@ -50,7 +50,7 @@ TEST_CASE(overlong_realpath)
     expected.append({ tmp_dir, strlen(tmp_dir) });
 
     // But first, demonstrate the functionality at a reasonable depth:
-    auto expected_str = expected.build();
+    auto expected_str = expected.to_deprecated_string();
     check_result("getwd", expected_str, getwd(static_cast<char*>(calloc(1, PATH_MAX))));
     check_result("getcwd", expected_str, getcwd(nullptr, 0));
     check_result("realpath", expected_str, realpath(".", nullptr));
@@ -74,7 +74,7 @@ TEST_CASE(overlong_realpath)
     outln("cwd should now be ridiculously large");
 
     // Evaluate
-    expected_str = expected.build();
+    expected_str = expected.to_deprecated_string();
 
     check_result("getwd", {}, getwd(static_cast<char*>(calloc(1, PATH_MAX))));
     check_result("getcwd", expected_str, getcwd(nullptr, 0));

+ 1 - 1
Tests/LibC/TestSnprintf.cpp

@@ -43,7 +43,7 @@ static DeprecatedString show(ByteBuffer const& buf)
             builder.append('_');
     }
     builder.append(')');
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 template<typename TArg>

+ 1 - 1
Tests/LibC/TestStrlcpy.cpp

@@ -37,7 +37,7 @@ static DeprecatedString show(ByteBuffer const& buf)
             builder.append('_');
     }
     builder.append(')');
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 static bool test_single(Testcase const& testcase)

+ 6 - 6
Tests/LibRegex/Regex.cpp

@@ -143,7 +143,7 @@ TEST_CASE(parser_error_special_characters_used_at_wrong_place)
         // First in ere
         b.clear();
         b.append(ch);
-        pattern = b.build();
+        pattern = b.to_deprecated_string();
         l.set_source(pattern);
         p.parse();
         EXPECT(p.has_error());
@@ -153,7 +153,7 @@ TEST_CASE(parser_error_special_characters_used_at_wrong_place)
         b.clear();
         b.append("a|"sv);
         b.append(ch);
-        pattern = b.build();
+        pattern = b.to_deprecated_string();
         l.set_source(pattern);
         p.parse();
         EXPECT(p.has_error());
@@ -163,7 +163,7 @@ TEST_CASE(parser_error_special_characters_used_at_wrong_place)
         b.clear();
         b.append('^');
         b.append(ch);
-        pattern = b.build();
+        pattern = b.to_deprecated_string();
         l.set_source(pattern);
         p.parse();
         EXPECT(p.has_error());
@@ -173,7 +173,7 @@ TEST_CASE(parser_error_special_characters_used_at_wrong_place)
         b.clear();
         b.append('$');
         b.append(ch);
-        pattern = b.build();
+        pattern = b.to_deprecated_string();
         l.set_source(pattern);
         p.parse();
         EXPECT(p.has_error());
@@ -184,7 +184,7 @@ TEST_CASE(parser_error_special_characters_used_at_wrong_place)
         b.append('(');
         b.append(ch);
         b.append(')');
-        pattern = b.build();
+        pattern = b.to_deprecated_string();
         l.set_source(pattern);
         p.parse();
         EXPECT(p.has_error());
@@ -722,7 +722,7 @@ TEST_CASE(ECMA262_unicode_match)
     StringBuilder builder;
     for (u32 code_point : space_and_line_terminator_code_points)
         builder.append_code_point(code_point);
-    auto space_and_line_terminators = builder.build();
+    auto space_and_line_terminators = builder.to_deprecated_string();
 
     struct _test {
         StringView pattern;

+ 5 - 5
Tests/LibRegex/RegexLibC.cpp

@@ -325,7 +325,7 @@ TEST_CASE(parser_error_special_characters_used_at_wrong_place)
         // First in ere
         b.clear();
         b.append(ch);
-        pattern = b.build();
+        pattern = b.to_deprecated_string();
         EXPECT_EQ(regcomp(&regex, pattern.characters(), REG_EXTENDED), error_code_to_check);
         EXPECT_EQ(regexec(&regex, "test", num_matches, matches, 0), error_code_to_check);
         regfree(&regex);
@@ -334,7 +334,7 @@ TEST_CASE(parser_error_special_characters_used_at_wrong_place)
         b.clear();
         b.append("a|"sv);
         b.append(ch);
-        pattern = b.build();
+        pattern = b.to_deprecated_string();
         EXPECT_EQ(regcomp(&regex, pattern.characters(), REG_EXTENDED), error_code_to_check);
         EXPECT_EQ(regexec(&regex, "test", num_matches, matches, 0), error_code_to_check);
         regfree(&regex);
@@ -343,7 +343,7 @@ TEST_CASE(parser_error_special_characters_used_at_wrong_place)
         b.clear();
         b.append('^');
         b.append(ch);
-        pattern = b.build();
+        pattern = b.to_deprecated_string();
         EXPECT_EQ(regcomp(&regex, pattern.characters(), REG_EXTENDED), error_code_to_check);
         EXPECT_EQ(regexec(&regex, "test", num_matches, matches, 0), error_code_to_check);
         regfree(&regex);
@@ -352,7 +352,7 @@ TEST_CASE(parser_error_special_characters_used_at_wrong_place)
         b.clear();
         b.append('$');
         b.append(ch);
-        pattern = b.build();
+        pattern = b.to_deprecated_string();
         EXPECT_EQ(regcomp(&regex, pattern.characters(), REG_EXTENDED), error_code_to_check);
         EXPECT_EQ(regexec(&regex, "test", num_matches, matches, 0), error_code_to_check);
         regfree(&regex);
@@ -362,7 +362,7 @@ TEST_CASE(parser_error_special_characters_used_at_wrong_place)
         b.append('(');
         b.append(ch);
         b.append(')');
-        pattern = b.build();
+        pattern = b.to_deprecated_string();
         EXPECT_EQ(regcomp(&regex, pattern.characters(), REG_EXTENDED), error_code_to_check);
         EXPECT_EQ(regexec(&regex, "test", num_matches, matches, 0), error_code_to_check);
         regfree(&regex);

+ 2 - 2
Tests/LibSQL/TestSqlDatabase.cpp

@@ -51,7 +51,7 @@ void insert_into_table(SQL::Database& db, int count)
         StringBuilder builder;
         builder.appendff("Test{}", ix);
 
-        row["TextColumn"] = builder.build();
+        row["TextColumn"] = builder.to_deprecated_string();
         row["IntColumn"] = ix;
         auto maybe_error = db.insert(row);
         EXPECT(!maybe_error.is_error());
@@ -69,7 +69,7 @@ void verify_table_contents(SQL::Database& db, int expected_count)
     for (auto& row : rows_or_error.value()) {
         StringBuilder builder;
         builder.appendff("Test{}", row["IntColumn"].to_int<i32>().value());
-        EXPECT_EQ(row["TextColumn"].to_deprecated_string(), builder.build());
+        EXPECT_EQ(row["TextColumn"].to_deprecated_string(), builder.to_deprecated_string());
         count++;
         sum += row["IntColumn"].to_int<i32>().value();
     }

+ 8 - 8
Tests/LibSQL/TestSqlExpressionParser.cpp

@@ -249,14 +249,14 @@ TEST_CASE(binary_operator)
         StringBuilder builder;
         builder.append("1 "sv);
         builder.append(op.key);
-        EXPECT(parse(builder.build()).is_error());
+        EXPECT(parse(builder.to_deprecated_string()).is_error());
 
         builder.clear();
 
         if (op.key != "+" && op.key != "-") { // "+1" and "-1" are fine (unary operator).
             builder.append(op.key);
             builder.append(" 1"sv);
-            EXPECT(parse(builder.build()).is_error());
+            EXPECT(parse(builder.to_deprecated_string()).is_error());
         }
     }
 
@@ -278,7 +278,7 @@ TEST_CASE(binary_operator)
         builder.append("1 "sv);
         builder.append(op.key);
         builder.append(" 1"sv);
-        validate(builder.build(), op.value);
+        validate(builder.to_deprecated_string(), op.value);
     }
 }
 
@@ -485,12 +485,12 @@ TEST_CASE(match_expression)
         StringBuilder builder;
         builder.append("1 "sv);
         builder.append(op.key);
-        EXPECT(parse(builder.build()).is_error());
+        EXPECT(parse(builder.to_deprecated_string()).is_error());
 
         builder.clear();
         builder.append(op.key);
         builder.append(" 1"sv);
-        EXPECT(parse(builder.build()).is_error());
+        EXPECT(parse(builder.to_deprecated_string()).is_error());
     }
 
     auto validate = [](StringView sql, SQL::AST::MatchOperator expected_operator, bool expected_invert_expression, bool expect_escape) {
@@ -513,19 +513,19 @@ TEST_CASE(match_expression)
         builder.append("1 "sv);
         builder.append(op.key);
         builder.append(" 1"sv);
-        validate(builder.build(), op.value, false, false);
+        validate(builder.to_deprecated_string(), op.value, false, false);
 
         builder.clear();
         builder.append("1 NOT "sv);
         builder.append(op.key);
         builder.append(" 1"sv);
-        validate(builder.build(), op.value, true, false);
+        validate(builder.to_deprecated_string(), op.value, true, false);
 
         builder.clear();
         builder.append("1 NOT "sv);
         builder.append(op.key);
         builder.append(" 1 ESCAPE '+'"sv);
-        validate(builder.build(), op.value, true, true);
+        validate(builder.to_deprecated_string(), op.value, true, true);
     }
 }
 

+ 2 - 2
Userland/Applications/Browser/CookieJar.cpp

@@ -88,7 +88,7 @@ DeprecatedString CookieJar::get_cookie(const URL& url, Web::Cookie::Source sourc
         builder.appendff("{}={}", cookie.name, cookie.value);
     }
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 void CookieJar::set_cookie(const URL& url, Web::Cookie::ParsedCookie const& parsed_cookie, Web::Cookie::Source source)
@@ -150,7 +150,7 @@ void CookieJar::dump_cookies()
         builder.appendff("\t{}SameSite{} = {:s}\n", attribute_color, no_color, Web::Cookie::same_site_to_string(cookie.same_site));
     });
 
-    dbgln("{} cookies stored\n{}", total_cookies, builder.build());
+    dbgln("{} cookies stored\n{}", total_cookies, builder.to_deprecated_string());
 }
 
 Vector<Web::Cookie::Cookie> CookieJar::get_all_cookies()

+ 1 - 1
Userland/Applications/Browser/Tab.cpp

@@ -518,7 +518,7 @@ Optional<URL> Tab::url_from_location_bar(MayAppendTLD may_append_tld)
             builder.append(".com"sv);
         }
     }
-    DeprecatedString final_text = builder.to_deprecated_string();
+    auto final_text = builder.to_deprecated_string();
 
     auto url = url_from_user_input(final_text);
     return url;

+ 1 - 1
Userland/Applications/CharacterMap/CharacterSearchWidget.cpp

@@ -90,6 +90,6 @@ void CharacterSearchWidget::search()
         StringBuilder builder;
         builder.append_code_point(code_point);
 
-        model.add_result({ code_point, builder.build(), move(display_name) });
+        model.add_result({ code_point, builder.to_deprecated_string(), move(display_name) });
     });
 }

+ 2 - 2
Userland/Applications/CrashReporter/main.cpp

@@ -100,7 +100,7 @@ static TitleAndText build_backtrace(Coredump::Reader const& coredump, ELF::Core:
 
     return {
         DeprecatedString::formatted("Thread #{} (TID {})", thread_index, thread_info.tid),
-        builder.build()
+        builder.to_deprecated_string()
     };
 }
 
@@ -125,7 +125,7 @@ static TitleAndText build_cpu_registers(const ELF::Core::ThreadInfo& thread_info
 
     return {
         DeprecatedString::formatted("Thread #{} (TID {})", thread_index, thread_info.tid),
-        builder.build()
+        builder.to_deprecated_string()
     };
 }
 

+ 2 - 2
Userland/Applications/FileManager/main.cpp

@@ -144,7 +144,7 @@ void do_copy(Vector<DeprecatedString> const& selected_file_paths, FileOperation
         auto url = URL::create_with_file_scheme(path);
         copy_text.appendff("{}\n", url);
     }
-    GUI::Clipboard::the().set_data(copy_text.build().bytes(), "text/uri-list");
+    GUI::Clipboard::the().set_data(copy_text.to_deprecated_string().bytes(), "text/uri-list");
 }
 
 void do_paste(DeprecatedString const& target_directory, GUI::Window* window)
@@ -213,7 +213,7 @@ void do_create_archive(Vector<DeprecatedString> const& selected_file_paths, GUI:
         if (!archive_name.ends_with(".zip"sv))
             path_builder.append(".zip"sv);
     }
-    auto output_path = path_builder.build();
+    auto output_path = path_builder.to_deprecated_string();
 
     pid_t zip_pid = fork();
     if (zip_pid < 0) {

+ 1 - 1
Userland/Applications/SpaceAnalyzer/main.cpp

@@ -146,7 +146,7 @@ static DeprecatedString get_absolute_path_to_selected_node(SpaceAnalyzer::TreeMa
         TreeNode const* node = treemapwidget.path_node(k);
         path_builder.append(node->name());
     }
-    return path_builder.build();
+    return path_builder.to_deprecated_string();
 }
 
 ErrorOr<int> serenity_main(Main::Arguments arguments)

+ 1 - 1
Userland/Applications/Spreadsheet/Cell.cpp

@@ -42,7 +42,7 @@ void Cell::set_data(JS::Value new_data)
     StringBuilder builder;
 
     builder.append(new_data.to_string_without_side_effects());
-    m_data = builder.build();
+    m_data = builder.to_deprecated_string();
 
     m_evaluated_data = move(new_data);
 }

+ 1 - 1
Userland/Applications/Spreadsheet/CellType/Format.cpp

@@ -43,7 +43,7 @@ DeprecatedString format_double(char const* format, double value)
     auto putch = [&](auto, auto ch) { builder.append(ch); };
     printf_internal<decltype(putch), PrintfImpl, double, SingleEntryListNext>(putch, nullptr, format, value);
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 }

+ 1 - 1
Userland/Applications/Spreadsheet/Spreadsheet.cpp

@@ -745,7 +745,7 @@ DeprecatedString Sheet::generate_inline_documentation_for(StringView function, s
     }
 
     builder.append(')');
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 DeprecatedString Position::to_cell_identifier(Sheet const& sheet) const

+ 1 - 1
Userland/DevTools/HackStudio/Editor.cpp

@@ -737,7 +737,7 @@ void Editor::handle_function_parameters_hint_request()
         }
         html.append("<style>body { background-color: #dac7b5; }</style>"sv);
 
-        s_tooltip_page_view->load_html(html.build(), {});
+        s_tooltip_page_view->load_html(html.to_deprecated_string(), {});
 
         auto cursor_rect = current_editor().cursor_content_rect().location().translated(screen_relative_rect().location());
 

+ 1 - 1
Userland/DevTools/Profiler/DisassemblyModel.cpp

@@ -222,7 +222,7 @@ GUI::Variant DisassemblyModel::data(GUI::ModelIndex const& index, GUI::ModelRole
                 auto const& entry = insn.source_position_with_inlines.source_position.value();
                 builder.appendff("{}:{}", entry.file_path, entry.line_number);
             }
-            return builder.build();
+            return builder.to_deprecated_string();
         }
 
         return {};

+ 1 - 1
Userland/Games/Chess/ChessWidget.cpp

@@ -381,7 +381,7 @@ static RefPtr<Gfx::Bitmap> get_piece(StringView set, StringView image)
     builder.append(set);
     builder.append('/');
     builder.append(image);
-    return Gfx::Bitmap::load_from_file(builder.build()).release_value_but_fixme_should_propagate_errors();
+    return Gfx::Bitmap::load_from_file(builder.to_deprecated_string()).release_value_but_fixme_should_propagate_errors();
 }
 
 void ChessWidget::set_piece_set(StringView set)

+ 1 - 1
Userland/Libraries/LibC/semaphore.cpp

@@ -48,7 +48,7 @@ static ErrorOr<DeprecatedString> sem_name_to_path(char const* name)
     StringBuilder builder;
     TRY(builder.try_append(sem_path_prefix));
     TRY(builder.try_append(name_view));
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 struct NamedSemaphore {

+ 1 - 1
Userland/Libraries/LibC/stdlib.cpp

@@ -641,7 +641,7 @@ int ptsname_r(int fd, char* buffer, size_t size)
         return -1;
     }
     memset(buffer, 0, devpts_path_builder.length() + 1);
-    auto full_devpts_path_string = devpts_path_builder.build();
+    auto full_devpts_path_string = devpts_path_builder.to_deprecated_string();
     if (!full_devpts_path_string.copy_characters_to_buffer(buffer, size)) {
         errno = ERANGE;
         return -1;

+ 1 - 1
Userland/Libraries/LibC/syslog.cpp

@@ -124,7 +124,7 @@ void vsyslog_r(int priority, struct syslog_data* data, char const* message, va_l
         combined.appendff("{}: ", get_syslog_ident(data));
 
     combined.appendvf(message, args);
-    DeprecatedString combined_string = combined.build();
+    auto combined_string = combined.to_deprecated_string();
 
     if (data->logopt & LOG_CONS)
         dbgputstr(combined_string.characters(), combined_string.length());

+ 1 - 1
Userland/Libraries/LibC/time.cpp

@@ -390,7 +390,7 @@ size_t strftime(char* destination, size_t max_size, char const* format, const st
             return 0;
     }
 
-    auto str = builder.build();
+    auto str = builder.to_deprecated_string();
     bool fits = str.copy_characters_to_buffer(destination, max_size);
     return fits ? str.length() : 0;
 }

+ 1 - 1
Userland/Libraries/LibCards/CardStack.h

@@ -137,6 +137,6 @@ struct AK::Formatter<Cards::CardStack> : Formatter<FormatString> {
             first_card = false;
         }
 
-        return Formatter<FormatString>::format(builder, "{:<10} {:>16}: {}"sv, type, stack.bounding_box(), cards.build());
+        return Formatter<FormatString>::format(builder, "{:<10} {:>16}: {}"sv, type, stack.bounding_box(), cards.to_deprecated_string());
     }
 };

+ 3 - 3
Userland/Libraries/LibChess/Chess.cpp

@@ -82,7 +82,7 @@ DeprecatedString Square::to_algebraic() const
     StringBuilder builder;
     builder.append(file + 'a');
     builder.append(rank + '1');
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 Move::Move(StringView long_algebraic)
@@ -98,7 +98,7 @@ DeprecatedString Move::to_long_algebraic() const
     builder.append(from.to_algebraic());
     builder.append(to.to_algebraic());
     builder.append(char_for_piece(promote_to).to_lowercase());
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 Move Move::from_algebraic(StringView algebraic, const Color turn, Board const& board)
@@ -216,7 +216,7 @@ DeprecatedString Move::to_algebraic() const
     else if (is_check)
         builder.append('+');
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 Board::Board()

+ 7 - 7
Userland/Libraries/LibChess/UCICommand.cpp

@@ -105,7 +105,7 @@ DeprecatedString SetOptionCommand::to_deprecated_string() const
         builder.append(value().value());
     }
     builder.append('\n');
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 PositionCommand PositionCommand::from_string(StringView command)
@@ -141,7 +141,7 @@ DeprecatedString PositionCommand::to_deprecated_string() const
         builder.append(move.to_long_algebraic());
     }
     builder.append('\n');
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 GoCommand GoCommand::from_string(StringView command)
@@ -227,7 +227,7 @@ DeprecatedString GoCommand::to_deprecated_string() const
         builder.append(" infinite"sv);
 
     builder.append('\n');
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 StopCommand StopCommand::from_string(StringView command)
@@ -256,9 +256,9 @@ IdCommand IdCommand::from_string(StringView command)
     }
 
     if (tokens[1] == "name") {
-        return IdCommand(Type::Name, value.build());
+        return IdCommand(Type::Name, value.to_deprecated_string());
     } else if (tokens[1] == "author") {
-        return IdCommand(Type::Author, value.build());
+        return IdCommand(Type::Author, value.to_deprecated_string());
     }
     VERIFY_NOT_REACHED();
 }
@@ -274,7 +274,7 @@ DeprecatedString IdCommand::to_deprecated_string() const
     }
     builder.append(value());
     builder.append('\n');
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 UCIOkCommand UCIOkCommand::from_string(StringView command)
@@ -317,7 +317,7 @@ DeprecatedString BestMoveCommand::to_deprecated_string() const
     builder.append("bestmove "sv);
     builder.append(move().to_long_algebraic());
     builder.append('\n');
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 InfoCommand InfoCommand::from_string([[maybe_unused]] StringView command)

+ 1 - 1
Userland/Libraries/LibCodeComprehension/Shell/ShellComprehensionEngine.cpp

@@ -81,7 +81,7 @@ Vector<DeprecatedString> const& ShellComprehensionEngine::DocumentData::sourced_
                         auto name_list = const_cast<::Shell::AST::Node*>(filename.ptr())->run(nullptr)->resolve_as_list(nullptr);
                         StringBuilder builder;
                         builder.join(' ', name_list);
-                        sourced_files.set(builder.build());
+                        sourced_files.set(builder.to_deprecated_string());
                     }
                 }
             }

+ 2 - 2
Userland/Libraries/LibCore/Account.cpp

@@ -39,7 +39,7 @@ static DeprecatedString get_salt()
     auto salt_string = MUST(encode_base64({ random_data, sizeof(random_data) }));
     builder.append(salt_string);
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 static Vector<gid_t> get_extra_gids(passwd const& pwd)
@@ -196,7 +196,7 @@ void Account::set_password_enabled(bool enabled)
         StringBuilder builder;
         builder.append('!');
         builder.append(m_password_hash);
-        m_password_hash = builder.build();
+        m_password_hash = builder.to_deprecated_string();
     }
 }
 

+ 1 - 1
Userland/Libraries/LibCore/ArgsParser.cpp

@@ -77,7 +77,7 @@ bool ArgsParser::parse(int argc, char* const* argv, FailureBehavior failure_beha
     }
     long_options.append({ 0, 0, 0, 0 });
 
-    DeprecatedString short_options = short_options_builder.build();
+    auto short_options = short_options_builder.to_deprecated_string();
 
     while (true) {
         int c = getopt_long(argc, argv, short_options.characters(), long_options.data(), nullptr);

+ 1 - 1
Userland/Libraries/LibCore/DateTime.cpp

@@ -273,7 +273,7 @@ DeprecatedString DateTime::to_deprecated_string(StringView format) const
         }
     }
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 Optional<DateTime> DateTime::parse(StringView format, DeprecatedString const& string)

+ 1 - 1
Userland/Libraries/LibCore/File.cpp

@@ -394,7 +394,7 @@ static DeprecatedString get_duplicate_name(DeprecatedString const& path, int dup
     if (!lexical_path.extension().is_empty()) {
         duplicated_name.appendff(".{}", lexical_path.extension());
     }
-    return duplicated_name.build();
+    return duplicated_name.to_deprecated_string();
 }
 
 ErrorOr<void, File::CopyError> File::copy_file_or_directory(DeprecatedString const& dst_path, DeprecatedString const& src_path, RecursionMode recursion_mode, LinkMode link_mode, AddDuplicateFileMarker add_duplicate_file_marker, PreserveMode preserve_mode)

+ 2 - 2
Userland/Libraries/LibCoredump/Backtrace.cpp

@@ -131,7 +131,7 @@ DeprecatedString Backtrace::Entry::to_deprecated_string(bool color) const
     builder.appendff("{:p}: ", eip);
     if (object_name.is_empty()) {
         builder.append("???"sv);
-        return builder.build();
+        return builder.to_deprecated_string();
     }
     builder.appendff("[{}] {}", object_name, function_name.is_empty() ? "???" : function_name);
     builder.append(" ("sv);
@@ -158,7 +158,7 @@ DeprecatedString Backtrace::Entry::to_deprecated_string(bool color) const
 
     builder.append(')');
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 }

+ 2 - 2
Userland/Libraries/LibCpp/SemanticSyntaxHighlighter.cpp

@@ -32,8 +32,8 @@ void SemanticSyntaxHighlighter::rehighlight(Palette const& palette)
         for (Cpp::Token const& token : m_saved_tokens)
             previous_tokens_as_lines.appendff("{}\n", token.type_as_deprecated_string());
 
-        auto previous = previous_tokens_as_lines.build();
-        auto current = current_tokens_as_lines.build();
+        auto previous = previous_tokens_as_lines.to_deprecated_string();
+        auto current = current_tokens_as_lines.to_deprecated_string();
 
         // FIXME: Computing the diff on the entire document's tokens is quite inefficient.
         //        An improvement over this could be only including the tokens that are in edited text ranges in the diff.

+ 1 - 1
Userland/Libraries/LibCrypto/Authentication/HMAC.h

@@ -79,7 +79,7 @@ public:
         StringBuilder builder;
         builder.append("HMAC-"sv);
         builder.append(m_inner_hasher.class_name());
-        return builder.build();
+        return builder.to_deprecated_string();
     }
 #endif
 

+ 2 - 2
Userland/Libraries/LibCrypto/Cipher/AES.cpp

@@ -30,7 +30,7 @@ DeprecatedString AESCipherBlock::to_deprecated_string() const
     StringBuilder builder;
     for (auto value : m_data)
         builder.appendff("{:02x}", value);
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 DeprecatedString AESCipherKey::to_deprecated_string() const
@@ -38,7 +38,7 @@ DeprecatedString AESCipherKey::to_deprecated_string() const
     StringBuilder builder;
     for (size_t i = 0; i < (rounds() + 1) * 4; ++i)
         builder.appendff("{:02x}", m_rd_keys[i]);
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 #endif
 

+ 1 - 1
Userland/Libraries/LibCrypto/Cipher/Mode/CBC.h

@@ -35,7 +35,7 @@ public:
         StringBuilder builder;
         builder.append(this->cipher().class_name());
         builder.append("_CBC"sv);
-        return builder.build();
+        return builder.to_deprecated_string();
     }
 #endif
 

+ 1 - 1
Userland/Libraries/LibCrypto/Cipher/Mode/CTR.h

@@ -110,7 +110,7 @@ public:
         StringBuilder builder;
         builder.append(this->cipher().class_name());
         builder.append("_CTR"sv);
-        return builder.build();
+        return builder.to_deprecated_string();
     }
 #endif
 

+ 1 - 1
Userland/Libraries/LibCrypto/Cipher/Mode/GCM.h

@@ -50,7 +50,7 @@ public:
         StringBuilder builder;
         builder.append(this->cipher().class_name());
         builder.append("_GCM"sv);
-        return builder.build();
+        return builder.to_deprecated_string();
     }
 #endif
 

+ 2 - 2
Userland/Libraries/LibEDID/EDID.cpp

@@ -1010,7 +1010,7 @@ DeprecatedString Parser::display_product_name() const
                 break;
             str.append((char)byte);
         }
-        product_name = str.build();
+        product_name = str.to_deprecated_string();
         return IterationDecision::Break;
     });
     if (result.is_error()) {
@@ -1033,7 +1033,7 @@ DeprecatedString Parser::display_product_serial_number() const
                 break;
             str.append((char)byte);
         }
-        product_name = str.build();
+        product_name = str.to_deprecated_string();
         return IterationDecision::Break;
     });
     if (result.is_error()) {

+ 1 - 1
Userland/Libraries/LibGUI/GML/AutocompleteProvider.cpp

@@ -118,7 +118,7 @@ void AutocompleteProvider::provide_completions(Function<void(Vector<CodeComprehe
             fuzzy_str_builder.append(character);
             fuzzy_str_builder.append('*');
         }
-        return fuzzy_str_builder.build();
+        return fuzzy_str_builder.to_deprecated_string();
     };
 
     Vector<CodeComprehension::AutocompleteResultEntry> class_entries, identifier_entries;

+ 1 - 1
Userland/Libraries/LibGUI/TextDocument.cpp

@@ -854,7 +854,7 @@ void InsertTextCommand::perform_formatting(TextDocument::Client const& client)
             ++column;
         }
     }
-    m_text = builder.build();
+    m_text = builder.to_deprecated_string();
 }
 
 void InsertTextCommand::redo()

+ 1 - 1
Userland/Libraries/LibGemini/Document.cpp

@@ -25,7 +25,7 @@ DeprecatedString Document::render_to_html() const
     }
     html_builder.append("</body>"sv);
     html_builder.append("</html>"sv);
-    return html_builder.build();
+    return html_builder.to_deprecated_string();
 }
 
 NonnullRefPtr<Document> Document::parse(StringView lines, const URL& url)

+ 4 - 4
Userland/Libraries/LibGemini/Line.cpp

@@ -14,7 +14,7 @@ DeprecatedString Text::render_to_html() const
     StringBuilder builder;
     builder.append(escape_html_entities(m_text));
     builder.append("<br>\n"sv);
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 DeprecatedString Heading::render_to_html() const
@@ -31,7 +31,7 @@ DeprecatedString UnorderedList::render_to_html() const
     builder.append("<li>"sv);
     builder.append(escape_html_entities(m_text.substring_view(1, m_text.length() - 1)));
     builder.append("</li>"sv);
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 DeprecatedString Control::render_to_html() const
@@ -81,7 +81,7 @@ DeprecatedString Link::render_to_html() const
     builder.append("\">"sv);
     builder.append(escape_html_entities(m_name));
     builder.append("</a><br>\n"sv);
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 DeprecatedString Preformatted::render_to_html() const
@@ -90,7 +90,7 @@ DeprecatedString Preformatted::render_to_html() const
     builder.append(escape_html_entities(m_text));
     builder.append('\n');
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 }

+ 1 - 1
Userland/Libraries/LibHTTP/Job.cpp

@@ -371,7 +371,7 @@ void Job::on_socket_connected()
                 builder.append(existing_value.value());
                 builder.append(',');
                 builder.append(value);
-                m_headers.set(name, builder.build());
+                m_headers.set(name, builder.to_deprecated_string());
             } else {
                 m_headers.set(name, value);
             }

+ 1 - 1
Userland/Libraries/LibIDL/IDLParser.cpp

@@ -73,7 +73,7 @@ static DeprecatedString convert_enumeration_value_to_cpp_enum_member(DeprecatedS
         builder.append('_');
 
     names_already_seen.set(builder.string_view());
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 namespace IDL {

+ 3 - 3
Userland/Libraries/LibIMAP/Client.cpp

@@ -306,7 +306,7 @@ RefPtr<Promise<Optional<SolidResponse>>> Client::store(StoreMethod method, Seque
     flags_builder.join(' ', flags);
     flags_builder.append(')');
 
-    auto command = Command { uid ? CommandType::UIDStore : CommandType::Store, m_current_command, { sequence_set.serialize(), data_item_name.build(), flags_builder.build() } };
+    auto command = Command { uid ? CommandType::UIDStore : CommandType::Store, m_current_command, { sequence_set.serialize(), data_item_name.to_deprecated_string(), flags_builder.to_deprecated_string() } };
     return cast_promise<SolidResponse>(send_command(move(command)));
 }
 RefPtr<Promise<Optional<SolidResponse>>> Client::search(Optional<DeprecatedString> charset, Vector<SearchKey>&& keys, bool uid)
@@ -363,7 +363,7 @@ RefPtr<Promise<Optional<SolidResponse>>> Client::status(StringView mailbox, Vect
     types_list.append('(');
     types_list.join(' ', args);
     types_list.append(')');
-    auto command = Command { CommandType::Status, m_current_command, { mailbox, types_list.build() } };
+    auto command = Command { CommandType::Status, m_current_command, { mailbox, types_list.to_deprecated_string() } };
     return cast_promise<SolidResponse>(send_command(move(command)));
 }
 
@@ -375,7 +375,7 @@ RefPtr<Promise<Optional<SolidResponse>>> Client::append(StringView mailbox, Mess
         flags_sb.append('(');
         flags_sb.join(' ', flags.value());
         flags_sb.append(')');
-        args.append(flags_sb.build());
+        args.append(flags_sb.to_deprecated_string());
     }
     if (date_time.has_value())
         args.append(date_time.value().to_deprecated_string("\"%d-%b-%Y %H:%M:%S +0000\""sv));

+ 5 - 5
Userland/Libraries/LibIMAP/Objects.cpp

@@ -41,7 +41,7 @@ DeprecatedString FetchCommand::DataItem::Section::serialize() const
             first = false;
         }
         headers_builder.append(')');
-        return headers_builder.build();
+        return headers_builder.to_deprecated_string();
     }
     case SectionType::Text:
         return "TEXT";
@@ -57,7 +57,7 @@ DeprecatedString FetchCommand::DataItem::Section::serialize() const
         if (ends_with_mime) {
             sb.append(".MIME"sv);
         }
-        return sb.build();
+        return sb.to_deprecated_string();
     }
     }
     VERIFY_NOT_REACHED();
@@ -82,7 +82,7 @@ DeprecatedString FetchCommand::DataItem::serialize() const
             sb.appendff("<{}.{}>", start, octets);
         }
 
-        return sb.build();
+        return sb.to_deprecated_string();
     }
     case DataItemType::BodyStructure:
         return "BODYSTRUCTURE";
@@ -111,7 +111,7 @@ DeprecatedString FetchCommand::serialize()
         first = false;
     }
 
-    return AK::DeprecatedString::formatted("{} ({})", sequence_builder.build(), data_items_builder.build());
+    return AK::DeprecatedString::formatted("{} ({})", sequence_builder.to_deprecated_string(), data_items_builder.to_deprecated_string());
 }
 DeprecatedString serialize_astring(StringView string)
 {
@@ -164,7 +164,7 @@ DeprecatedString SearchKey::serialize() const
                 sb.append(item->serialize());
                 first = false;
             }
-            return sb.build();
+            return sb.to_deprecated_string();
         },
         [&](Seen const&) { return DeprecatedString("SEEN"); },
         [&](SentBefore const& x) { return DeprecatedString::formatted("SENTBEFORE {}", x.date.to_deprecated_string("%d-%b-%Y"sv)); },

+ 1 - 1
Userland/Libraries/LibIMAP/Parser.cpp

@@ -83,7 +83,7 @@ void Parser::parse_response_done()
     }
 
     consume("\r\n"sv);
-    m_response.m_response_text = response_data.build();
+    m_response.m_response_text = response_data.to_deprecated_string();
 }
 
 void Parser::consume(StringView x)

+ 1 - 1
Userland/Libraries/LibJS/AST.cpp

@@ -3762,7 +3762,7 @@ Completion TemplateLiteral::execute(Interpreter& interpreter) const
     }
 
     // 7. Return the string-concatenation of head, middle, and tail.
-    return Value { PrimitiveString::create(vm, string_builder.build()) };
+    return Value { PrimitiveString::create(vm, string_builder.to_deprecated_string()) };
 }
 
 void TaggedTemplateLiteral::dump(int indent) const

+ 1 - 1
Userland/Libraries/LibJS/Bytecode/Pass/MergeBlocks.cpp

@@ -142,7 +142,7 @@ void MergeBlocks::perform(PassPipelineExecutable& executable)
             builder.append(entry->name());
         }
 
-        auto new_block = BasicBlock::create(builder.build(), size);
+        auto new_block = BasicBlock::create(builder.to_deprecated_string(), size);
         auto& block = *new_block;
         auto first_successor_position = replace_blocks(successors, *new_block);
         VERIFY(first_successor_position.has_value());

+ 1 - 1
Userland/Libraries/LibJS/ParserError.cpp

@@ -32,7 +32,7 @@ DeprecatedString ParserError::source_location_hint(StringView source, char const
     for (size_t i = 0; i < position.value().column - 1; ++i)
         builder.append(spacer);
     builder.append(indicator);
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 }

+ 1 - 1
Userland/Libraries/LibJS/Runtime/Date.cpp

@@ -57,7 +57,7 @@ DeprecatedString Date::iso_date_string() const
     builder.appendff("{:03}", ms_from_time(m_date_value));
     builder.append('Z');
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 // DayWithinYear(t), https://tc39.es/ecma262/#eqn-DayWithinYear

+ 1 - 1
Userland/Libraries/LibJS/Runtime/Error.cpp

@@ -95,7 +95,7 @@ DeprecatedString Error::stack_string() const
         }
     }
 
-    return stack_string_builder.build();
+    return stack_string_builder.to_deprecated_string();
 }
 
 #define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName, ArrayType)              \

+ 4 - 4
Userland/Libraries/LibJS/Runtime/GlobalObject.cpp

@@ -413,7 +413,7 @@ static ThrowCompletionOr<DeprecatedString> encode(VM& vm, DeprecatedString const
             VERIFY(nwritten > 0);
         }
     }
-    return encoded_builder.build();
+    return encoded_builder.to_deprecated_string();
 }
 
 // 19.2.6.1.2 Decode ( string, reservedSet ), https://tc39.es/ecma262/#sec-decode
@@ -471,7 +471,7 @@ static ThrowCompletionOr<DeprecatedString> decode(VM& vm, DeprecatedString const
     }
     if (expected_continuation_bytes > 0)
         return vm.throw_completion<URIError>(ErrorType::URIMalformed);
-    return decoded_builder.build();
+    return decoded_builder.to_deprecated_string();
 }
 
 // 19.2.6.4 encodeURI ( uri ), https://tc39.es/ecma262/#sec-encodeuri-uri
@@ -521,7 +521,7 @@ JS_DEFINE_NATIVE_FUNCTION(GlobalObject::escape)
         }
         escaped.appendff("%u{:04X}", code_point);
     }
-    return PrimitiveString::create(vm, escaped.build());
+    return PrimitiveString::create(vm, escaped.to_deprecated_string());
 }
 
 // B.2.1.2 unescape ( string ), https://tc39.es/ecma262/#sec-unescape-string
@@ -543,7 +543,7 @@ JS_DEFINE_NATIVE_FUNCTION(GlobalObject::unescape)
         }
         unescaped.append_code_point(code_point);
     }
-    return PrimitiveString::create(vm, unescaped.build());
+    return PrimitiveString::create(vm, unescaped.to_deprecated_string());
 }
 
 }

+ 1 - 1
Userland/Libraries/LibJS/Runtime/Intl/DurationFormatPrototype.cpp

@@ -55,7 +55,7 @@ JS_DEFINE_NATIVE_FUNCTION(DurationFormatPrototype::format)
     }
 
     // 7. Return result.
-    return PrimitiveString::create(vm, result.build());
+    return PrimitiveString::create(vm, result.to_deprecated_string());
 }
 
 // 1.4.4 Intl.DurationFormat.prototype.formatToParts ( duration ), https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.formatToParts

+ 1 - 1
Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.cpp

@@ -237,7 +237,7 @@ ThrowCompletionOr<DeprecatedString> format_relative_time(VM& vm, RelativeTimeFor
     }
 
     // 4. Return result.
-    return result.build();
+    return result.to_deprecated_string();
 }
 
 // 17.5.5 FormatRelativeTimeToParts ( relativeTimeFormat, value, unit ), https://tc39.es/ecma402/#sec-FormatRelativeTimeToParts

+ 1 - 1
Userland/Libraries/LibJS/Runtime/RegExpObject.cpp

@@ -116,7 +116,7 @@ ErrorOr<DeprecatedString, ParseRegexPatternError> parse_regex_pattern(StringView
             builder.append_code_point(code_unit);
     }
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 ThrowCompletionOr<DeprecatedString> parse_regex_pattern(VM& vm, StringView pattern, bool unicode, bool unicode_sets)

+ 2 - 2
Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp

@@ -820,13 +820,13 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_replace)
 
     // 15. If nextSourcePosition ≥ lengthS, return accumulatedResult.
     if (next_source_position >= string.length_in_code_units())
-        return PrimitiveString::create(vm, accumulated_result.build());
+        return PrimitiveString::create(vm, accumulated_result.to_deprecated_string());
 
     // 16. Return the string-concatenation of accumulatedResult and the substring of S from nextSourcePosition.
     auto substring = string.substring_view(next_source_position);
     accumulated_result.append(substring);
 
-    return PrimitiveString::create(vm, accumulated_result.build());
+    return PrimitiveString::create(vm, accumulated_result.to_deprecated_string());
 }
 
 // 22.2.5.12 RegExp.prototype [ @@search ] ( string ), https://tc39.es/ecma262/#sec-regexp.prototype-@@search

+ 1 - 1
Userland/Libraries/LibJS/Runtime/StringConstructor.cpp

@@ -94,7 +94,7 @@ JS_DEFINE_NATIVE_FUNCTION(StringConstructor::raw)
             builder.append(next_sub);
         }
     }
-    return PrimitiveString::create(vm, builder.build());
+    return PrimitiveString::create(vm, builder.to_deprecated_string());
 }
 
 // 22.1.2.1 String.fromCharCode ( ...codeUnits ), https://tc39.es/ecma262/#sec-string.fromcharcode

+ 1 - 1
Userland/Libraries/LibJS/Token.cpp

@@ -63,7 +63,7 @@ double Token::double_value() const
         builder.append(ch);
     }
 
-    DeprecatedString value_string = builder.to_deprecated_string();
+    auto value_string = builder.to_deprecated_string();
     if (value_string[0] == '0' && value_string.length() >= 2) {
         if (value_string[1] == 'x' || value_string[1] == 'X') {
             // hexadecimal

+ 3 - 3
Userland/Libraries/LibLine/Editor.cpp

@@ -372,7 +372,7 @@ void Editor::insert(const u32 cp)
 {
     StringBuilder builder;
     builder.append(Utf32View(&cp, 1));
-    auto str = builder.build();
+    auto str = builder.to_deprecated_string();
     if (m_pending_chars.try_append(str.characters(), str.length()).is_error())
         return;
 
@@ -1750,7 +1750,7 @@ DeprecatedString Style::to_deprecated_string() const
 
     builder.append('}');
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 ErrorOr<void> VT::apply_style(Style const& style, Core::Stream::Stream& stream, bool is_starting)
@@ -2182,7 +2182,7 @@ DeprecatedString Editor::line(size_t up_to_index) const
 {
     StringBuilder builder;
     builder.append(Utf32View { m_buffer.data(), min(m_buffer.size(), up_to_index) });
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 void Editor::remove_at_index(size_t index)

+ 3 - 3
Userland/Libraries/LibLine/InternalFunctions.cpp

@@ -36,7 +36,7 @@ void Editor::search_forwards()
     ScopedValueRollback inline_search_cursor_rollback { m_inline_search_cursor };
     StringBuilder builder;
     builder.append(Utf32View { m_buffer.data(), m_inline_search_cursor });
-    DeprecatedString search_phrase = builder.to_deprecated_string();
+    auto search_phrase = builder.to_deprecated_string();
     if (m_search_offset_state == SearchOffsetState::Backwards)
         --m_search_offset;
     if (m_search_offset > 0) {
@@ -63,7 +63,7 @@ void Editor::search_backwards()
     ScopedValueRollback inline_search_cursor_rollback { m_inline_search_cursor };
     StringBuilder builder;
     builder.append(Utf32View { m_buffer.data(), m_inline_search_cursor });
-    DeprecatedString search_phrase = builder.to_deprecated_string();
+    auto search_phrase = builder.to_deprecated_string();
     if (m_search_offset_state == SearchOffsetState::Forwards)
         ++m_search_offset;
     if (search(search_phrase, true)) {
@@ -237,7 +237,7 @@ void Editor::enter_search()
 
             StringBuilder builder;
             builder.append(Utf32View { search_editor.buffer().data(), search_editor.buffer().size() });
-            if (!search(builder.build(), false, false)) {
+            if (!search(builder.to_deprecated_string(), false, false)) {
                 m_chars_touched_in_the_middle = m_buffer.size();
                 m_refresh_needed = true;
                 m_buffer.clear();

+ 1 - 1
Userland/Libraries/LibLocale/DateTimeFormat.cpp

@@ -290,7 +290,7 @@ static ErrorOr<Optional<String>> format_time_zone_offset(StringView locale, Cale
     }
 
     // The digits used for hours, minutes and seconds fields in this format are the locale's default decimal digits.
-    auto result = TRY(replace_digits_for_number_system(*number_system, builder.build()));
+    auto result = TRY(replace_digits_for_number_system(*number_system, builder.to_deprecated_string()));
     return TRY(String::from_utf8(formats->gmt_format)).replace("{0}"sv, result, ReplaceMode::FirstOnly);
 }
 

+ 1 - 1
Userland/Libraries/LibMarkdown/BlockQuote.cpp

@@ -17,7 +17,7 @@ DeprecatedString BlockQuote::render_to_html(bool) const
     builder.append("<blockquote>\n"sv);
     builder.append(m_contents->render_to_html());
     builder.append("</blockquote>\n"sv);
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 Vector<DeprecatedString> BlockQuote::render_lines_for_terminal(size_t view_width) const

+ 3 - 3
Userland/Libraries/LibMarkdown/CodeBlock.cpp

@@ -51,7 +51,7 @@ DeprecatedString CodeBlock::render_to_html(bool) const
 
     builder.append("</pre>\n"sv);
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 Vector<DeprecatedString> CodeBlock::render_lines_for_terminal(size_t) const
@@ -174,7 +174,7 @@ OwnPtr<CodeBlock> CodeBlock::parse_backticks(LineIterator& lines, Heading* curre
         builder.append('\n');
     }
 
-    return make<CodeBlock>(language, style, builder.build(), current_section);
+    return make<CodeBlock>(language, style, builder.to_deprecated_string(), current_section);
 }
 
 OwnPtr<CodeBlock> CodeBlock::parse_indent(LineIterator& lines)
@@ -197,6 +197,6 @@ OwnPtr<CodeBlock> CodeBlock::parse_indent(LineIterator& lines)
         builder.append('\n');
     }
 
-    return make<CodeBlock>("", "", builder.build(), nullptr);
+    return make<CodeBlock>("", "", builder.to_deprecated_string(), nullptr);
 }
 }

+ 2 - 2
Userland/Libraries/LibMarkdown/CommentBlock.cpp

@@ -20,7 +20,7 @@ DeprecatedString CommentBlock::render_to_html(bool) const
     // TODO: This is probably incorrect, because we technically need to escape "--" in some form. However, Browser does not care about this.
     builder.append("-->\n"sv);
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 Vector<DeprecatedString> CommentBlock::render_lines_for_terminal(size_t) const
@@ -69,7 +69,7 @@ OwnPtr<CommentBlock> CommentBlock::parse(LineIterator& lines)
         line = *lines;
     }
 
-    return make<CommentBlock>(builder.build());
+    return make<CommentBlock>(builder.to_deprecated_string());
 }
 
 }

+ 2 - 2
Userland/Libraries/LibMarkdown/ContainerBlock.cpp

@@ -37,7 +37,7 @@ DeprecatedString ContainerBlock::render_to_html(bool tight) const
         }
     }
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 Vector<DeprecatedString> ContainerBlock::render_lines_for_terminal(size_t view_width) const
@@ -97,7 +97,7 @@ OwnPtr<ContainerBlock> ContainerBlock::parse(LineIterator& lines)
     auto flush_paragraph = [&] {
         if (paragraph_text.is_empty())
             return;
-        auto paragraph = make<Paragraph>(Text::parse(paragraph_text.build()));
+        auto paragraph = make<Paragraph>(Text::parse(paragraph_text.to_deprecated_string()));
         blocks.append(move(paragraph));
         paragraph_text.clear();
     };

+ 2 - 2
Userland/Libraries/LibMarkdown/Document.cpp

@@ -35,7 +35,7 @@ DeprecatedString Document::render_to_html(StringView extra_head_contents) const
 </body>
 </html>)~~~"sv);
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 DeprecatedString Document::render_to_inline_html() const
@@ -51,7 +51,7 @@ DeprecatedString Document::render_for_terminal(size_t view_width) const
         builder.append("\n"sv);
     }
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 RecursionDecision Document::walk(Visitor& visitor) const

+ 1 - 1
Userland/Libraries/LibMarkdown/Heading.cpp

@@ -32,7 +32,7 @@ Vector<DeprecatedString> Heading::render_lines_for_terminal(size_t) const
         break;
     }
 
-    return Vector<DeprecatedString> { builder.build() };
+    return Vector<DeprecatedString> { builder.to_deprecated_string() };
 }
 
 RecursionDecision Heading::walk(Visitor& visitor) const

+ 3 - 3
Userland/Libraries/LibMarkdown/List.cpp

@@ -35,7 +35,7 @@ DeprecatedString List::render_to_html(bool) const
 
     builder.appendff("</{}>\n", tag);
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 Vector<DeprecatedString> List::render_lines_for_terminal(size_t view_width) const
@@ -57,13 +57,13 @@ Vector<DeprecatedString> List::render_lines_for_terminal(size_t view_width) cons
 
         builder.append(first_line);
 
-        lines.append(builder.build());
+        lines.append(builder.to_deprecated_string());
 
         for (auto& line : item_lines) {
             builder.clear();
             builder.append(DeprecatedString::repeated(' ', item_indentation));
             builder.append(line);
-            lines.append(builder.build());
+            lines.append(builder.to_deprecated_string());
         }
     }
 

+ 1 - 1
Userland/Libraries/LibMarkdown/Paragraph.cpp

@@ -25,7 +25,7 @@ DeprecatedString Paragraph::render_to_html(bool tight) const
 
     builder.append('\n');
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 Vector<DeprecatedString> Paragraph::render_lines_for_terminal(size_t) const

+ 3 - 3
Userland/Libraries/LibMarkdown/Table.cpp

@@ -44,12 +44,12 @@ Vector<DeprecatedString> Table::render_lines_for_terminal(size_t view_width) con
         write_aligned(col.header, width, col.alignment);
     }
 
-    lines.append(builder.build());
+    lines.append(builder.to_deprecated_string());
     builder.clear();
 
     for (size_t i = 0; i < view_width; ++i)
         builder.append('-');
-    lines.append(builder.build());
+    lines.append(builder.to_deprecated_string());
     builder.clear();
 
     for (size_t i = 0; i < m_row_count; ++i) {
@@ -65,7 +65,7 @@ Vector<DeprecatedString> Table::render_lines_for_terminal(size_t view_width) con
             size_t width = col.relative_width * unit_width_length;
             write_aligned(cell, width, col.alignment);
         }
-        lines.append(builder.build());
+        lines.append(builder.to_deprecated_string());
         builder.clear();
     }
 

+ 4 - 4
Userland/Libraries/LibMarkdown/Text.cpp

@@ -266,14 +266,14 @@ DeprecatedString Text::render_to_html() const
 {
     StringBuilder builder;
     m_node->render_to_html(builder);
-    return builder.build().trim(" \n\t"sv);
+    return builder.to_deprecated_string().trim(" \n\t"sv);
 }
 
 DeprecatedString Text::render_for_terminal() const
 {
     StringBuilder builder;
     m_node->render_for_terminal(builder);
-    return builder.build().trim(" \n\t"sv);
+    return builder.to_deprecated_string().trim(" \n\t"sv);
 }
 
 RecursionDecision Text::walk(Visitor& visitor) const
@@ -323,7 +323,7 @@ Vector<Text::Token> Text::tokenize(StringView str)
             return;
 
         tokens.append({
-            current_token.build(),
+            current_token.to_deprecated_string(),
             left_flanking,
             right_flanking,
             punct_before,
@@ -627,7 +627,7 @@ NonnullOwnPtr<Text::Node> Text::parse_link(Vector<Token>::ConstIterator& tokens)
 
         if (*iterator == ")"sv) {
             tokens = iterator;
-            return make<LinkNode>(is_image, move(link_text), address.build().trim_whitespace(), image_width, image_height);
+            return make<LinkNode>(is_image, move(link_text), address.to_deprecated_string().trim_whitespace(), image_width, image_height);
         }
 
         address.append(iterator->data);

+ 1 - 1
Userland/Libraries/LibRegex/RegexMatch.h

@@ -273,7 +273,7 @@ public:
                 StringBuilder builder;
                 for (auto ch : data)
                     builder.append(ch); // Note: The type conversion is intentional.
-                optional_string_storage = builder.build();
+                optional_string_storage = builder.to_deprecated_string();
                 return RegexStringView { T { *optional_string_storage } };
             },
             [&](Utf32View) {

+ 1 - 1
Userland/Libraries/LibRegex/RegexMatcher.cpp

@@ -96,7 +96,7 @@ DeprecatedString Regex<Parser>::error_string(Optional<DeprecatedString> message)
         eb.append(' ');
 
     eb.appendff("^---- {}", message.value_or(get_error_string(parser_result.error)));
-    return eb.build();
+    return eb.to_deprecated_string();
 }
 
 template<typename Parser>

+ 3 - 3
Userland/Libraries/LibRegex/RegexParser.cpp

@@ -598,7 +598,7 @@ ALWAYS_INLINE bool PosixExtendedParser::parse_repetition_symbol(ByteCode& byteco
             number_builder.append(consume().value());
         }
 
-        auto maybe_minimum = number_builder.build().to_uint();
+        auto maybe_minimum = number_builder.to_deprecated_string().to_uint();
         if (!maybe_minimum.has_value())
             return set_error(Error::InvalidBraceContent);
 
@@ -627,7 +627,7 @@ ALWAYS_INLINE bool PosixExtendedParser::parse_repetition_symbol(ByteCode& byteco
             number_builder.append(consume().value());
         }
         if (!number_builder.is_empty()) {
-            auto value = number_builder.build().to_uint();
+            auto value = number_builder.to_deprecated_string().to_uint();
             if (!value.has_value() || minimum > value.value() || *value > s_maximum_repetition_count)
                 return set_error(Error::InvalidBraceContent);
 
@@ -2530,7 +2530,7 @@ DeprecatedFlyString ECMA262Parser::read_capture_group_specifier(bool take_starti
         builder.append_code_point(code_point);
     }
 
-    DeprecatedFlyString name = builder.build();
+    DeprecatedFlyString name = builder.to_deprecated_string();
     if (!hit_end || name.is_empty())
         set_error(Error::InvalidNameForCaptureGroup);
 

+ 2 - 2
Userland/Libraries/LibSQL/AST/Expression.cpp

@@ -211,7 +211,7 @@ ResultOr<Value> MatchExpression::evaluate(ExecutionContext& context) const
         builder.append('$');
 
         // FIXME: We should probably cache this regex.
-        auto regex = Regex<PosixBasic>(builder.build());
+        auto regex = Regex<PosixBasic>(builder.to_deprecated_string());
         auto result = regex.match(lhs_value.to_deprecated_string(), PosixFlags::Insensitive | PosixFlags::Unicode);
         return Value(invert_expression() ? !result.success : result.success);
     }
@@ -226,7 +226,7 @@ ResultOr<Value> MatchExpression::evaluate(ExecutionContext& context) const
             builder.append("Regular expression: "sv);
             builder.append(get_error_string(err));
 
-            return Result { SQLCommand::Unknown, SQLErrorCode::SyntaxError, builder.build() };
+            return Result { SQLCommand::Unknown, SQLErrorCode::SyntaxError, builder.to_deprecated_string() };
         }
 
         auto result = regex.match(lhs_value.to_deprecated_string(), PosixFlags::Insensitive | PosixFlags::Unicode);

+ 1 - 1
Userland/Libraries/LibSQL/AST/Lexer.cpp

@@ -109,7 +109,7 @@ Token Lexer::next()
         }
     }
 
-    Token token(token_type, current_token.build(),
+    Token token(token_type, current_token.to_deprecated_string(),
         { value_start_line_number, value_start_column_number },
         { m_line_number, m_line_column });
 

+ 1 - 1
Userland/Libraries/LibSQL/Result.cpp

@@ -41,7 +41,7 @@ DeprecatedString Result::error_string() const
         builder.append(error_description);
     }
 
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 }

+ 1 - 1
Userland/Libraries/LibSQL/TreeNode.cpp

@@ -364,7 +364,7 @@ void TreeNode::dump_if(int flag, DeprecatedString&& msg)
         builder.append(", leaf"sv);
     }
     builder.append(')');
-    dbgln(builder.build());
+    dbgln(builder.to_deprecated_string());
 }
 
 void TreeNode::list_node(int indent)

+ 1 - 1
Userland/Libraries/LibSQL/Tuple.cpp

@@ -173,7 +173,7 @@ DeprecatedString Tuple::to_deprecated_string() const
     if (pointer() != 0) {
         builder.appendff(":{}", pointer());
     }
-    return builder.build();
+    return builder.to_deprecated_string();
 }
 
 void Tuple::copy_from(Tuple const& other)

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است