mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user