closeEnough

- Implemented closeEnough, which does a truncated, caseless compare
  between two strings.  For example, "FoO" is cloneEnough to "food."
  to be a match.  Used to allow mixed case and abbreviated arguments.
This commit is contained in:
Paul Beckingham
2011-07-07 01:33:43 -04:00
parent 63e3f5711e
commit 2ce0b5a1ab
2 changed files with 13 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ bool isWordStart (const std::string&, std::string::size_type);
bool isWordEnd (const std::string&, std::string::size_type);
bool isPunctuation (char);
bool compare (const std::string&, const std::string&, bool sensitive = true);
bool closeEnough (const std::string&, const std::string&);
std::string::size_type find (const std::string&, const std::string&, bool sensitive = true);
std::string::size_type find (const std::string&, const std::string&, std::string::size_type, bool sensitive = true);
int strippedLength (const std::string&);