26class OPENCC_EXPORT PrefixMatch {
33 const std::string* key;
34 const std::string* value;
37 explicit PrefixMatch(
const DictPtr& dict);
40 Match MatchPrefix(
const char* word,
size_t len)
const;
69 static void AppendCacheKey(
const DictPtr& dict, std::string* output);
70 static void CollectLeafDicts(
const DictPtr& dict,
71 std::vector<std::weak_ptr<const Dict>>* output);
77 std::shared_ptr<const Tables> tables;
size_t SkipUnmatchable(const char *word, size_t len) const
Returns the number of leading bytes of word that are guaranteed not to begin any dictionary key: whol...
PrefixMatchView MatchPrefixView(const char *word, size_t len) const
Like MatchPrefix but returns non-owning string_view fields without copying key or value into thread-l...
Definition PrefixMatch.hpp:30
Result of a PrefixMatch fast-path lookup.
Definition Dict.hpp:52