mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:57:44 +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
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <LibIPC/Forward.h>
|
||||
#include <time.h>
|
||||
|
@ -31,12 +31,12 @@ public:
|
|||
bool is_leap_year() const;
|
||||
|
||||
void set_time(int year, int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0);
|
||||
String to_string(StringView format = "%Y-%m-%d %H:%M:%S"sv) const;
|
||||
DeprecatedString to_string(StringView format = "%Y-%m-%d %H:%M:%S"sv) const;
|
||||
|
||||
static DateTime create(int year, int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0);
|
||||
static DateTime now();
|
||||
static DateTime from_timestamp(time_t);
|
||||
static Optional<DateTime> parse(StringView format, String const& string);
|
||||
static Optional<DateTime> parse(StringView format, DeprecatedString const& string);
|
||||
|
||||
bool operator<(DateTime const& other) const { return m_timestamp < other.m_timestamp; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue