chromium/net/base/parse_number.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/base/parse_number.h"

#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"

namespace net {

namespace {

// The string to number conversion functions in //base include the type in the
// name (like StringToInt64()). The following wrapper methods create a
// consistent interface to StringToXXX() that calls the appropriate //base
// version. This simplifies writing generic code with a template.

bool StringToNumber(std::string_view input, int32_t* output) {}

bool StringToNumber(std::string_view input, uint32_t* output) {}

bool StringToNumber(std::string_view input, int64_t* output) {}

bool StringToNumber(std::string_view input, uint64_t* output) {}

bool SetError(ParseIntError error, ParseIntError* optional_error) {}

template <typename T>
bool ParseIntHelper(std::string_view input,
                    ParseIntFormat format,
                    T* output,
                    ParseIntError* optional_error) {}

}  // namespace

bool ParseInt32(std::string_view input,
                ParseIntFormat format,
                int32_t* output,
                ParseIntError* optional_error) {}

bool ParseInt64(std::string_view input,
                ParseIntFormat format,
                int64_t* output,
                ParseIntError* optional_error) {}

bool ParseUint32(std::string_view input,
                 ParseIntFormat format,
                 uint32_t* output,
                 ParseIntError* optional_error) {}

bool ParseUint64(std::string_view input,
                 ParseIntFormat format,
                 uint64_t* output,
                 ParseIntError* optional_error) {}

}  // namespace net