Move libraries/library_dict to C++ (need to fix res_scat_nuclides)

This commit is contained in:
Paul Romano 2018-11-05 21:35:41 -06:00
parent 029f4b9a26
commit b65ad32422
8 changed files with 340 additions and 288 deletions

View file

@ -38,5 +38,12 @@ ends_with(const std::string& value, const std::string& ending)
return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
}
inline bool
starts_with(const std::string& value, const std::string& beginning)
{
if (beginning.size() > value.size()) return false;
return std::equal(beginning.begin(), beginning.end(), value.begin());
}
} // namespace openmc
#endif // OPENMC_STRING_UTILS_H