STYLE: single-string findStrings deprecated in favour of stringOps::match

- reduces ambiguity between matching a list of strings and a single string.
This commit is contained in:
Mark Olesen
2017-11-13 10:37:38 +01:00
parent 5a6b59d8b0
commit 14d4484fae
8 changed files with 25 additions and 23 deletions

View File

@ -42,6 +42,7 @@ SourceFiles
#include "dictionary.H"
#include "HashTable.H"
#include "stringOpsSort.H"
#include "wordRes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -61,6 +62,13 @@ namespace stringOps
// Correctly handles nullptr.
std::string::size_type count(const char* str, const char c);
//- Return true if text matches one of the regular expressions.
// Simply forwards a wordReList to a wordRes for the matching.
inline bool match(const wordReList& patterns, const std::string& text)
{
return wordRes(patterns).match(text);
}
//- Expand occurences of variables according to the mapping
// Expansion includes: