#include "components/sync/model/string_ordinal.h"
#include <algorithm>
#include <utility>
#include "base/check.h"
#include "base/check_op.h"
#include "base/json/string_escape.h"
namespace syncer {
const uint8_t StringOrdinal::kZeroDigit;
const uint8_t StringOrdinal::kMaxDigit;
const size_t StringOrdinal::kMinLength;
const uint8_t StringOrdinal::kOneDigit;
const uint8_t StringOrdinal::kMidDigit;
const unsigned int StringOrdinal::kMidDigitValue;
const unsigned int StringOrdinal::kMaxDigitValue;
const unsigned int StringOrdinal::kRadix;
StringOrdinal::LessThanFn::LessThanFn() = default;
bool StringOrdinal::LessThanFn::operator()(const StringOrdinal& lhs,
const StringOrdinal& rhs) const { … }
StringOrdinal::EqualsFn::EqualsFn() = default;
bool StringOrdinal::EqualsFn::operator()(const StringOrdinal& lhs,
const StringOrdinal& rhs) const { … }
bool operator==(const StringOrdinal& lhs, const StringOrdinal& rhs) { … }
StringOrdinal::StringOrdinal(std::string bytes)
: … { … }
StringOrdinal::StringOrdinal() : … { … }
StringOrdinal StringOrdinal::CreateInitialOrdinal() { … }
bool StringOrdinal::IsValid() const { … }
bool StringOrdinal::EqualsOrBothInvalid(const StringOrdinal& other) const { … }
std::string StringOrdinal::ToDebugString() const { … }
bool StringOrdinal::LessThan(const StringOrdinal& other) const { … }
bool StringOrdinal::GreaterThan(const StringOrdinal& other) const { … }
bool StringOrdinal::Equals(const StringOrdinal& other) const { … }
StringOrdinal StringOrdinal::CreateBetween(const StringOrdinal& other) const { … }
StringOrdinal StringOrdinal::CreateBefore() const { … }
StringOrdinal StringOrdinal::CreateAfter() const { … }
std::string StringOrdinal::ToInternalValue() const { … }
bool StringOrdinal::IsValidOrdinalBytes(const std::string& bytes) { … }
size_t StringOrdinal::GetLengthWithoutTrailingZeroDigits(
const std::string& bytes,
size_t length) { … }
uint8_t StringOrdinal::GetDigit(const std::string& bytes, size_t i) { … }
int StringOrdinal::GetDigitValue(const std::string& bytes, size_t i) { … }
int StringOrdinal::AddDigitValue(std::string* bytes,
size_t i,
int digit_value) { … }
size_t StringOrdinal::GetProperLength(const std::string& lower_bound,
const std::string& bytes) { … }
std::string StringOrdinal::ComputeMidpoint(const std::string& start,
const std::string& end) { … }
StringOrdinal StringOrdinal::CreateOrdinalBetween(const StringOrdinal& start,
const StringOrdinal& end) { … }
}