mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: change wordRes to be a List of wordRe instead of a wrapper (issue #259)
- this permits direct storage of a list with additional matcher capabilities - provide wordRes::matcher class for similar behaviour as previously
This commit is contained in:
@ -63,13 +63,11 @@ namespace stringOps
|
||||
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)
|
||||
inline bool match(const UList<wordRe>& patterns, const std::string& text)
|
||||
{
|
||||
return wordRes(patterns).match(text);
|
||||
return wordRes::matcher(patterns)(text);
|
||||
}
|
||||
|
||||
|
||||
//- Expand occurences of variables according to the mapping
|
||||
// Expansion includes:
|
||||
// -# variables
|
||||
|
||||
Reference in New Issue
Block a user