2018-08-06 21:31:30 -05:00
|
|
|
#ifndef OPENMC_STRING_UTILS_H
|
2018-08-07 10:27:17 -05:00
|
|
|
#define OPENMC_STRING_UTILS_H
|
2018-06-11 15:00:18 -04:00
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
namespace openmc {
|
|
|
|
|
|
2018-11-06 10:23:11 -06:00
|
|
|
std::string& strtrim(std::string& s);
|
|
|
|
|
|
|
|
|
|
char* strtrim(char* c_str);
|
|
|
|
|
|
|
|
|
|
void to_lower(std::string& str);
|
|
|
|
|
|
|
|
|
|
int word_count(std::string const& str);
|
|
|
|
|
|
|
|
|
|
std::vector<std::string> split(const std::string& in);
|
|
|
|
|
|
|
|
|
|
bool ends_with(const std::string& value, const std::string& ending);
|
|
|
|
|
|
|
|
|
|
bool starts_with(const std::string& value, const std::string& beginning);
|
2018-11-05 21:35:41 -06:00
|
|
|
|
2018-06-11 15:00:18 -04:00
|
|
|
} // namespace openmc
|
2018-08-06 21:31:30 -05:00
|
|
|
#endif // OPENMC_STRING_UTILS_H
|