#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/i18n/char_iterator.h"
#include <string_view>
#include "base/check_op.h"
#include "base/third_party/icu/icu_utf.h"
namespace base {
namespace i18n {
UTF8CharIterator::UTF8CharIterator(std::string_view str)
: … { … }
UTF8CharIterator::~UTF8CharIterator() = default;
bool UTF8CharIterator::Advance() { … }
UTF16CharIterator::UTF16CharIterator(std::u16string_view str)
: … { … }
UTF16CharIterator::UTF16CharIterator(UTF16CharIterator&& to_move) = default;
UTF16CharIterator::~UTF16CharIterator() = default;
UTF16CharIterator& UTF16CharIterator::operator=(UTF16CharIterator&& to_move) =
default;
UTF16CharIterator UTF16CharIterator::LowerBound(std::u16string_view str,
size_t array_index) { … }
UTF16CharIterator UTF16CharIterator::UpperBound(std::u16string_view str,
size_t array_index) { … }
int32_t UTF16CharIterator::NextCodePoint() const { … }
int32_t UTF16CharIterator::PreviousCodePoint() const { … }
bool UTF16CharIterator::Advance() { … }
bool UTF16CharIterator::Rewind() { … }
UTF16CharIterator::UTF16CharIterator(std::u16string_view str,
size_t initial_pos)
: … { … }
void UTF16CharIterator::ReadChar() { … }
}
}