bsnes/nall/string/atoi.hpp

26 lines
377 B
C++

#pragma once
namespace nall {
auto string::boolean() const -> bool {
return equals("true");
}
auto string::integer() const -> intmax {
return toInteger(data());
}
auto string::natural() const -> uintmax {
return toNatural(data());
}
auto string::hex() const -> uintmax {
return toHex(data());
}
auto string::real() const -> double {
return toReal(data());
}
}