diff options
author | HampusM <hampus@hampusmat.com> | 2022-02-19 17:30:16 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:53 +0200 |
commit | cc3869ac0b24a97dbadc6b837b3c23af28baa627 (patch) | |
tree | 3fa7156e1734de03d6b8152bfae219774bb38196 /src/conversion.hpp | |
parent | 4210c8d2f8fc36e614b8bfb669511c00383002f0 (diff) |
feat: add basic program stuff
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); |