1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:58:12 +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

@ -84,7 +84,7 @@ void DateTime::set_time(int year, int month, int day, int hour, int minute, int
m_second = tm.tm_sec;
}
String DateTime::to_string(StringView format) const
DeprecatedString DateTime::to_string(StringView format) const
{
struct tm tm;
localtime_r(&m_timestamp, &tm);
@ -120,7 +120,7 @@ String DateTime::to_string(StringView format) const
builder.append(format[i]);
} else {
if (++i == format_len)
return String();
return DeprecatedString();
switch (format[i]) {
case 'a':
@ -276,7 +276,7 @@ String DateTime::to_string(StringView format) const
return builder.build();
}
Optional<DateTime> DateTime::parse(StringView format, String const& string)
Optional<DateTime> DateTime::parse(StringView format, DeprecatedString const& string)
{
unsigned format_pos = 0;
unsigned string_pos = 0;