add new utility function utils::strfind()

This commit is contained in:
Axel Kohlmeyer
2021-02-25 23:03:17 -05:00
parent a9467e830e
commit 92d892aa2d
2 changed files with 23 additions and 0 deletions

View File

@ -37,6 +37,14 @@ namespace LAMMPS_NS {
bool strmatch(const std::string &text, const std::string &pattern);
/** Find substring that matches a simplified regex pattern
*
* \param text the text to be matched against the pattern
* \param pattern the search pattern, which may contain regexp markers
* \return the string that matches the patters or an empty one */
std::string strfind(const std::string &text, const std::string &pattern);
/** Send message to screen and logfile, if available
*
* \param lmp pointer to LAMMPS class instance