1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-06-18 04:00:03 +02:00

core/dictionary.h: Documentation

This commit is contained in:
Henrik Hautakoski 2020-02-26 15:23:38 +01:00
parent 3505af5c1f
commit fd91419642

View file

@ -34,7 +34,9 @@ namespace eoskeygen {
class Dictionary
{
public :
// index = position in the search string.
// Map that contains position and length for substrings.
//
// key = position in the search string.
// value = length of the word from this position.
typedef std::map< size_t, size_t > search_result_t;
@ -55,8 +57,8 @@ public :
bool contains(const std::string& word) const;
// Searches the subject for words defined in the dictionary.
// Returns a map with the word as key and a vector<int>
// of each position the word was found.
// Returns a search_result_t with the words found in subject.
// See search_result_t for more details.
search_result_t search(const std::string& subject) const;
protected :