new convencience function for checking valid IDs (includes unit tests)
This commit is contained in:
@ -335,6 +335,14 @@ namespace LAMMPS_NS {
|
||||
|
||||
bool is_double(const std::string &str);
|
||||
|
||||
/** Check if string is a valid ID
|
||||
* ID strings may contain only letters, numbers, and underscores.
|
||||
*
|
||||
* \param str string that should be checked
|
||||
* \return true, if string contains valid id, false otherwise */
|
||||
|
||||
bool is_id(const std::string &str);
|
||||
|
||||
/** Try to detect pathname from FILE pointer.
|
||||
*
|
||||
* Currently only supported on Linux, otherwise will report "(unknown)".
|
||||
|
||||
Reference in New Issue
Block a user