1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

Everywhere: Run clang-format

This commit is contained in:
Idan Horowitz 2022-04-01 20:58:27 +03:00 committed by Linus Groh
parent 0376c127f6
commit 086969277e
1665 changed files with 8479 additions and 8479 deletions

View file

@ -25,8 +25,8 @@ size_t allocation_size_for_stringimpl(size_t length);
class StringImpl : public RefCounted<StringImpl> {
public:
static NonnullRefPtr<StringImpl> create_uninitialized(size_t length, char*& buffer);
static RefPtr<StringImpl> create(const char* cstring, ShouldChomp = NoChomp);
static RefPtr<StringImpl> create(const char* cstring, size_t length, ShouldChomp = NoChomp);
static RefPtr<StringImpl> create(char const* cstring, ShouldChomp = NoChomp);
static RefPtr<StringImpl> create(char const* cstring, size_t length, ShouldChomp = NoChomp);
static RefPtr<StringImpl> create(ReadonlyBytes, ShouldChomp = NoChomp);
static RefPtr<StringImpl> create_lowercased(char const* cstring, size_t length);
static RefPtr<StringImpl> create_uppercased(char const* cstring, size_t length);
@ -45,18 +45,18 @@ public:
size_t length() const { return m_length; }
// Includes NUL-terminator.
const char* characters() const { return &m_inline_buffer[0]; }
char const* characters() const { return &m_inline_buffer[0]; }
ALWAYS_INLINE ReadonlyBytes bytes() const { return { characters(), length() }; }
ALWAYS_INLINE StringView view() const { return { characters(), length() }; }
const char& operator[](size_t i) const
char const& operator[](size_t i) const
{
VERIFY(i < m_length);
return characters()[i];
}
bool operator==(const StringImpl& other) const
bool operator==(StringImpl const& other) const
{
if (length() != other.length())
return false;