![]() |
Utilities
Utilities header only library
|
Enables mapping string keys to string words efficiently. More...
Public Member Functions | |
| void | Clear () |
| Clears whole database of words and keys. | |
| bool | IsAvailable (const std::string &key) const |
| Checks if there is a word available for a given key. | |
| void | Set (const std::string &key, const std::string &word) |
| Creates or changes the word of a given key. | |
| std::string | Get (const std::string &key, const std::string &default_word="") const |
| Returns a word for a given key. If word for such key does not exists, returns default_word. | |
| bool | Remove (const std::string &key) |
| Removes word for a given key. Results in true if an existing word was cleared. | |
| std::vector< std::string > | GetAllWords () const |
| Returns all stored words. | |
| std::vector< std::string > | GetAllWords (const std::string &key_prefix) const |
| Returns all stored words whose key starts with defined key_prefix. | |
Enables mapping string keys to string words efficiently.