Added new config system

Added emulator state class
Added emulator events
Minor improvements
This commit is contained in:
DH 2015-10-13 20:32:08 +03:00
parent bbfca3fc0d
commit e4f6eb04e8
20 changed files with 1435 additions and 112 deletions

View file

@ -208,6 +208,16 @@ std::vector<std::string> fmt::split(const std::string& source, std::initializer_
return std::move(result);
}
std::string fmt::trim(const std::string& source, const std::string& values)
{
std::size_t begin = source.find_first_not_of(values);
if (begin == source.npos)
return{};
return source.substr(begin, source.find_last_not_of(values) + 1);
}
std::string fmt::tolower(std::string source)
{
std::transform(source.begin(), source.end(), source.begin(), ::tolower);