diff options
Diffstat (limited to 'src/conversion.hpp')
-rw-r--r-- | src/conversion.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
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 <string_view> + +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); |