Implements most of the remaining core standard functions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user