|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Functions | |
| std::string | nearest (const std::string &want, const std::map< std::string, std::string > &table) |
| A short "did you mean" for a slug that did not resolve. | |
| std::string | suffixFor (const std::string &want, const std::map< std::string, std::string > &table) |
| std::string fsw::script::anonymous_namespace{Validate.cpp}::nearest | ( | const std::string & | want, |
| const std::map< std::string, std::string > & | table ) |
A short "did you mean" for a slug that did not resolve.
Cheap edit-distance-1-ish: same length with one character different, or a one-character insertion/deletion. Enough to catch the real typo (FUEL_VNT for FUEL_VENT) without pretending to be a spell checker.
Definition at line 13 of file Validate.cpp.
References a, b, diff(), and nearest().
Referenced by nearest(), and suffixFor().
| std::string fsw::script::anonymous_namespace{Validate.cpp}::suffixFor | ( | const std::string & | want, |
| const std::map< std::string, std::string > & | table ) |
Definition at line 48 of file Validate.cpp.
References table::empty(), near(), nearest(), and suffixFor().
Referenced by suffixFor().