atoi.hpp 412 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. namespace nall {
  3. inline auto string::boolean() const -> bool {
  4. return equals("true");
  5. }
  6. inline auto string::integer() const -> intmax {
  7. return toInteger(data());
  8. }
  9. inline auto string::natural() const -> uintmax {
  10. return toNatural(data());
  11. }
  12. inline auto string::hex() const -> uintmax {
  13. return toHex(data());
  14. }
  15. inline auto string::real() const -> double {
  16. return toReal(data());
  17. }
  18. }