pub fn clean_keywords(keywords: &str) -> StringExpand description
Cleans keywords by removing comments and extra whitespace (generic version).
This function works for any quantum chemistry program by removing:
- Lines starting with ‘#’ (full-line comments)
- Inline comments (text after ‘#’ on the same line as valid keywords)
- Empty lines
- Leading and trailing whitespace from each line
The remaining valid keywords are joined with single spaces.
§Arguments
keywords- The raw keyword string that may contain comments and extra whitespace
§Returns
Returns a String containing cleaned keywords joined with single spaces.