mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add keyType::null and wordRe::null, add match method to string classes
- provides a more uniform interface to string list operations etc STYLE: more complete docs for keyType
This commit is contained in:
@ -82,6 +82,8 @@ public:
|
||||
|
||||
static const char* const typeName;
|
||||
static int debug;
|
||||
|
||||
//- An empty string
|
||||
static const string null;
|
||||
|
||||
|
||||
@ -143,6 +145,9 @@ public:
|
||||
template<class String>
|
||||
static inline string quotemeta(const string&, const char quote='\\');
|
||||
|
||||
//- True when strings match literally
|
||||
inline bool match(const std::string&) const;
|
||||
|
||||
//- Avoid masking the normal std::string replace
|
||||
using std::string::replace;
|
||||
|
||||
|
||||
@ -176,6 +176,12 @@ inline String Foam::string::validate(const string& str)
|
||||
return ss;
|
||||
}
|
||||
|
||||
inline bool Foam::string::match(const std::string& str) const
|
||||
{
|
||||
// check as string
|
||||
return (str == *this);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
Reference in New Issue
Block a user