Merge branch 'master' into add-fmt-lib

# Conflicts:
#	src/lammps.cpp
#	src/utils.cpp
This commit is contained in:
Axel Kohlmeyer
2020-05-31 09:45:54 -04:00
231 changed files with 9289 additions and 4270 deletions

View File

@ -133,6 +133,36 @@ namespace LAMMPS_NS {
*/
tagint tnumeric(const char *file, int line, const char *str,
bool do_abort, LAMMPS *lmp);
/**
* \brief Trim anything from '#' onward
* \param line string that should be trimmed
* \return new string without comment (string)
*/
std::string trim_comment(const std::string & line);
/**
* \brief Count words in a single line, trim anything from '#' onward
* \param text string that should be trimmed and searched
* \param seperators string containing characters that will be treated as whitespace
* \return number of words found
*/
size_t count_words(const std::string & text, const std::string & seperators = " \t\r\n\f");
/**
* \brief Check if string can be converted to valid integer
* \param text string that should be checked
* \return true, if string contains valid integer, false otherwise
*/
bool is_integer(const std::string & str);
/**
* \brief Check if string can be converted to valid floating-point number
* \param text string that should be checked
* \return true, if string contains valid floating-point number, false otherwise
*/
bool is_double(const std::string & str);
}
}