chromium/third_party/skia/src/core/SkString.cpp

/*
 * Copyright 2006 The Android Open Source Project
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "include/core/SkString.h"

#include "include/private/base/SkDebug.h"
#include "include/private/base/SkFloatingPoint.h"
#include "include/private/base/SkMalloc.h"
#include "include/private/base/SkTPin.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkSafeMath.h"
#include "src/base/SkUTF.h"
#include "src/base/SkUtils.h"

#include <algorithm>
#include <cstdio>
#include <cstring>
#include <new>
#include <string_view>
#include <utility>

// number of bytes (on the stack) to receive the printf result
static const size_t kBufferSize =;

struct StringBuffer {};

template <int SIZE>
static StringBuffer apply_format_string(const char* format, va_list args, char (&stackBuffer)[SIZE],
                                        SkString* heapBuffer) SK_PRINTF_LIKE(1, 0);

template <int SIZE>
static StringBuffer apply_format_string(const char* format, va_list args, char (&stackBuffer)[SIZE],
                                        SkString* heapBuffer) {}

///////////////////////////////////////////////////////////////////////////////

bool SkStrEndsWith(const char string[], const char suffixStr[]) {}

bool SkStrEndsWith(const char string[], const char suffixChar) {}

int SkStrStartsWithOneOf(const char string[], const char prefixes[]) {}

char* SkStrAppendU32(char string[], uint32_t dec) {}

char* SkStrAppendS32(char string[], int32_t dec) {}

char* SkStrAppendU64(char string[], uint64_t dec, int minDigits) {}

char* SkStrAppendS64(char string[], int64_t dec, int minDigits) {}

char* SkStrAppendScalar(char string[], SkScalar value) {}

///////////////////////////////////////////////////////////////////////////////

const SkString::Rec SkString::gEmptyRec(0, 0);

#define SizeOfRec()

static uint32_t trim_size_t_to_u32(size_t value) {}

static size_t check_add32(size_t base, size_t extra) {}

sk_sp<SkString::Rec> SkString::Rec::Make(const char text[], size_t len) {}

void SkString::Rec::ref() const {}

void SkString::Rec::unref() const {}

bool SkString::Rec::unique() const {}

#ifdef SK_DEBUG
int32_t SkString::Rec::getRefCnt() const {}

const SkString& SkString::validate() const {}

SkString& SkString::validate() {}
#endif

///////////////////////////////////////////////////////////////////////////////

SkString::SkString() :{}

SkString::SkString(size_t len) {}

SkString::SkString(const char text[]) {}

SkString::SkString(const char text[], size_t len) {}

SkString::SkString(const SkString& src) :{}

SkString::SkString(SkString&& src) :{}

SkString::SkString(const std::string& src) {}

SkString::SkString(std::string_view src) {}

SkString::~SkString() {}

bool SkString::equals(const SkString& src) const {}

bool SkString::equals(const char text[]) const {}

bool SkString::equals(const char text[], size_t len) const {}

SkString& SkString::operator=(const SkString& src) {}

SkString& SkString::operator=(SkString&& src) {}

SkString& SkString::operator=(const char text[]) {}

void SkString::reset() {}

char* SkString::data() {}

void SkString::resize(size_t len) {}

void SkString::set(const char text[]) {}

void SkString::set(const char text[], size_t len) {}

void SkString::insert(size_t offset, const char text[]) {}

void SkString::insert(size_t offset, const char text[], size_t len) {}

void SkString::insertUnichar(size_t offset, SkUnichar uni) {}

void SkString::insertS32(size_t offset, int32_t dec) {}

void SkString::insertS64(size_t offset, int64_t dec, int minDigits) {}

void SkString::insertU32(size_t offset, uint32_t dec) {}

void SkString::insertU64(size_t offset, uint64_t dec, int minDigits) {}

void SkString::insertHex(size_t offset, uint32_t hex, int minDigits) {}

void SkString::insertScalar(size_t offset, SkScalar value) {}

///////////////////////////////////////////////////////////////////////////////

void SkString::printf(const char format[], ...) {}

void SkString::printVAList(const char format[], va_list args) {}

void SkString::appendf(const char format[], ...) {}

void SkString::appendVAList(const char format[], va_list args) {}

void SkString::prependf(const char format[], ...) {}

void SkString::prependVAList(const char format[], va_list args) {}

///////////////////////////////////////////////////////////////////////////////

void SkString::remove(size_t offset, size_t length) {}

void SkString::swap(SkString& other) {}

///////////////////////////////////////////////////////////////////////////////

SkString SkStringPrintf(const char* format, ...) {}