From cc3869ac0b24a97dbadc6b837b3c23af28baa627 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 19 Feb 2022 17:30:16 +0100 Subject: feat: add basic program stuff --- src/conversion.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/conversion.hpp (limited to 'src/conversion.hpp') diff --git a/src/conversion.hpp b/src/conversion.hpp new file mode 100644 index 0000000..4ae5b7c --- /dev/null +++ b/src/conversion.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include + +constexpr unsigned int NUMBER_BASE = 10U; + +/** + * Converts a string to a unsigned integer. + * + * @param str A string that possibly is a unsigned integer + * @returns A unsigned integer + */ +unsigned int str_to_uint(const std::string_view &str); -- cgit v1.2.3-18-g5258