Add count_words for C-Strings
This commit is contained in:
@ -166,6 +166,14 @@ namespace LAMMPS_NS {
|
||||
*/
|
||||
size_t count_words(const std::string & text);
|
||||
|
||||
/**
|
||||
* \brief Count words in C-string, ignore any whitespace matching " \t\r\n\f"
|
||||
* \param text string that should be searched
|
||||
* \param separators string containing characters that will be treated as whitespace
|
||||
* \return number of words found
|
||||
*/
|
||||
size_t count_words(const char * text);
|
||||
|
||||
/**
|
||||
* \brief Count words in a single line, trim anything from '#' onward
|
||||
* \param text string that should be trimmed and searched
|
||||
|
||||
Reference in New Issue
Block a user