#include "components/payments/core/currency_formatter.h"
#include <memory>
#include <string_view>
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "third_party/icu/source/common/unicode/stringpiece.h"
#include "third_party/icu/source/common/unicode/uchar.h"
#include "third_party/icu/source/common/unicode/utypes.h"
namespace payments {
namespace {
const int kMaximumNumFractionalDigits = …;
const static size_t kMaxCurrencyCodeLength = …;
const static size_t kMaxCurrencyCodeDisplayedChars = …;
const char kEllipsis[] = …;
bool ShouldUseCurrencyCode(const std::string& currency_code) { … }
std::string FormatCurrencyCode(const std::string& currency_code) { … }
}
CurrencyFormatter::CurrencyFormatter(const std::string& currency_code,
const std::string& locale_name)
: … { … }
CurrencyFormatter::~CurrencyFormatter() { … }
void CurrencyFormatter::SetMaxFractionalDigits(const int maxFractionalDigits) { … }
std::u16string CurrencyFormatter::Format(const std::string& amount) { … }
}