chromium/third_party/webrtc/rtc_base/strings/string_builder.cc

/*
 *  Copyright 2018 The WebRTC Project Authors. All rights reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#include "rtc_base/strings/string_builder.h"

#include <stdarg.h>

#include <cstdio>
#include <cstring>

#include "absl/strings/string_view.h"
#include "rtc_base/checks.h"
#include "rtc_base/numerics/safe_minmax.h"

namespace rtc {

SimpleStringBuilder::SimpleStringBuilder(rtc::ArrayView<char> buffer)
    :{}

SimpleStringBuilder& SimpleStringBuilder::operator<<(char ch) {}

SimpleStringBuilder& SimpleStringBuilder::operator<<(absl::string_view str) {}

// Numeric conversion routines.
//
// We use std::[v]snprintf instead of std::to_string because:
// * std::to_string relies on the current locale for formatting purposes,
//   and therefore concurrent calls to std::to_string from multiple threads
//   may result in partial serialization of calls
// * snprintf allows us to print the number directly into our buffer.
// * avoid allocating a std::string (potential heap alloc).
// TODO(tommi): Switch to std::to_chars in C++17.

SimpleStringBuilder& SimpleStringBuilder::operator<<(int i) {}

SimpleStringBuilder& SimpleStringBuilder::operator<<(unsigned i) {}

SimpleStringBuilder& SimpleStringBuilder::operator<<(long i) {}

SimpleStringBuilder& SimpleStringBuilder::operator<<(long long i) {}

SimpleStringBuilder& SimpleStringBuilder::operator<<(
    unsigned long i) {}

SimpleStringBuilder& SimpleStringBuilder::operator<<(
    unsigned long long i) {}

SimpleStringBuilder& SimpleStringBuilder::operator<<(float f) {}

SimpleStringBuilder& SimpleStringBuilder::operator<<(double f) {}

SimpleStringBuilder& SimpleStringBuilder::operator<<(long double f) {}

SimpleStringBuilder& SimpleStringBuilder::AppendFormat(const char* fmt, ...) {}

StringBuilder& StringBuilder::AppendFormat(const char* fmt, ...) {}

}  // namespace rtc