1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:34:57 +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:
Linus Groh 2022-12-04 18:02:33 +00:00 committed by Andreas Kling
parent f74251606d
commit 6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions

View file

@ -15,8 +15,8 @@
#include <AK/Vector.h>
#ifndef KERNEL
# include <AK/DeprecatedString.h>
# include <AK/FloatingPointStringConversions.h>
# include <AK/String.h>
#endif
namespace AK {
@ -450,7 +450,7 @@ Optional<size_t> find_any_of(StringView haystack, StringView needles, SearchDire
}
#ifndef KERNEL
String to_snakecase(StringView str)
DeprecatedString to_snakecase(StringView str)
{
auto should_insert_underscore = [&](auto i, auto current_char) {
if (i == 0)
@ -476,7 +476,7 @@ String to_snakecase(StringView str)
return builder.to_string();
}
String to_titlecase(StringView str)
DeprecatedString to_titlecase(StringView str)
{
StringBuilder builder;
bool next_is_upper = true;
@ -492,7 +492,7 @@ String to_titlecase(StringView str)
return builder.to_string();
}
String invert_case(StringView str)
DeprecatedString invert_case(StringView str)
{
StringBuilder builder(str.length());
@ -506,7 +506,7 @@ String invert_case(StringView str)
return builder.to_string();
}
String replace(StringView str, StringView needle, StringView replacement, ReplaceMode replace_mode)
DeprecatedString replace(StringView str, StringView needle, StringView replacement, ReplaceMode replace_mode)
{
if (str.is_empty())
return str;