Implements most of the remaining core standard functions
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-08-15 18:12:29 +02:00
parent 7523fb4294
commit 13b382def2
6 changed files with 173 additions and 25 deletions

View File

@@ -16,6 +16,10 @@ namespace Porygon::Utilities{
inline static std::u16string IntToString(long const &i) {
return to_16.from_bytes(std::to_string(i));
}
inline static std::u16string FloatToString(double const &i) {
return to_16.from_bytes(std::to_string(i));
}
inline static std::u16string ToUTF8(const std::string &s) {
return to_16.from_bytes(s);
}
@@ -27,6 +31,11 @@ namespace Porygon::Utilities{
auto parsed = std::stol(FromUTF8(s));
return parsed;
}
inline static double ParseFloat(const std::u16string &s){
auto parsed = std::stod(FromUTF8(s));
return parsed;
}
};
}