#include "ui/accessibility/ax_text_utils.h"
#include <algorithm>
#include <optional>
#include "base/check_op.h"
#include "base/i18n/break_iterator.h"
#include "base/notreached.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/accessibility/ax_enums.mojom.h"
namespace ui {
namespace {
base::i18n::BreakIterator::BreakType ICUBreakTypeForBoundaryType(
ax::mojom::TextBoundary boundary) { … }
}
size_t FindAccessibleTextBoundary(const std::u16string& text,
const std::vector<int>& line_breaks,
ax::mojom::TextBoundary boundary,
size_t start_offset,
ax::mojom::MoveDirection direction,
ax::mojom::TextAffinity affinity) { … }
std::vector<int> GetWordStartOffsets(const std::u16string& text) { … }
std::vector<int> GetWordEndOffsets(const std::u16string& text) { … }
std::vector<int> GetSentenceStartOffsets(const std::u16string& text) { … }
std::vector<int> GetSentenceEndOffsets(const std::u16string& text) { … }
}