mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 17:31:58 -05:00
AK: Remove String::format()
There are no more clients of this function, everyone has been converted to String::formatted().
This commit is contained in:
parent
0005fa0e2b
commit
edf0b14e23
2 changed files with 1 additions and 14 deletions
|
@ -30,7 +30,6 @@
|
|||
#include <AK/Memory.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Vector.h>
|
||||
|
||||
|
@ -232,16 +231,6 @@ template Optional<u16> String::to_uint() const;
|
|||
template Optional<u32> String::to_uint() const;
|
||||
template Optional<u64> String::to_uint() const;
|
||||
|
||||
String String::format(const char* fmt, ...)
|
||||
{
|
||||
StringBuilder builder;
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
builder.appendvf(fmt, ap);
|
||||
va_end(ap);
|
||||
return builder.to_string();
|
||||
}
|
||||
|
||||
bool String::starts_with(const StringView& str, CaseSensitivity case_sensitivity) const
|
||||
{
|
||||
return StringUtils::starts_with(*this, str, case_sensitivity);
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace AK {
|
|||
//
|
||||
// s = String("some literal");
|
||||
//
|
||||
// s = String::format("%d little piggies", m_piggies);
|
||||
// s = String::formatted("{} little piggies", m_piggies);
|
||||
//
|
||||
// StringBuilder builder;
|
||||
// builder.append("abc");
|
||||
|
@ -265,8 +265,6 @@ public:
|
|||
return String((const char*)buffer.data(), buffer.size(), should_chomp);
|
||||
}
|
||||
|
||||
[[nodiscard]] static String format(const char*, ...) __attribute__((format(printf, 1, 2)));
|
||||
|
||||
[[nodiscard]] static String vformatted(StringView fmtstr, TypeErasedFormatParams);
|
||||
|
||||
template<typename... Parameters>
|
||||
|
|
Loading…
Reference in a new issue