#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/tools/convert_dict/aff_reader.h"
#include <stddef.h>
#include <algorithm>
#include "base/files/file_util.h"
#include "base/i18n/icu_string_conversions.h"
#include "base/logging.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/tools/convert_dict/hunspell_reader.h"
namespace convert_dict {
namespace {
bool StringBeginsWith(const std::string& str, const char* with) { … }
void CollapseDuplicateSpaces(std::string* str) { … }
}
AffReader::AffReader(const base::FilePath& path)
: … { … }
AffReader::~AffReader() { … }
bool AffReader::Read() { … }
bool AffReader::EncodingToUTF8(const std::string& encoded,
std::string* utf8) const { … }
int AffReader::GetAFIndexForAFString(const std::string& af_string) { … }
std::vector<std::string> AffReader::GetAffixGroups() const { … }
int AffReader::AddAffixGroup(std::string* rule) { … }
void AffReader::AddAffix(std::string* rule) { … }
void AffReader::AddReplacement(std::string* rule) { … }
void AffReader::HandleRawCommand(const std::string& line) { … }
void AffReader::HandleEncodedCommand(const std::string& line) { … }
}