avoid having to use external test runner script by parsing environment variables directly

This commit is contained in:
Axel Kohlmeyer
2020-06-24 09:32:59 -04:00
parent 8cec13a038
commit ee5be42026
6 changed files with 137 additions and 28 deletions

View File

@ -18,6 +18,7 @@
#include "lmptype.h"
#include <string>
#include <vector>
#include <cstdio>
namespace LAMMPS_NS {
@ -181,6 +182,20 @@ namespace LAMMPS_NS {
*/
size_t trim_and_count_words(const std::string & text, const std::string & separators = " \t\r\n\f");
/**
* \brief Take text and split into non-whitespace words.
*
* This can handle single and double quotes, escaped quotes,
* and escaped codes within quotes, but due to using an STL
* container and STL strings is rather slow because of making
* copies. Designed for parsing command lines and similar text
* and not for time critical processing. Use a tokenizer for that.
*
* \param text string that should be split
* \return STL vector with the words
*/
std::vector<std::string> split_words(const std::string &text);
/**
* \brief Check if string can be converted to valid integer
* \param text string that should be checked