aboutsummaryrefslogtreecommitdiff
path: root/src/conversion.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-02-15 20:27:51 +0100
committerHampusM <hampus@hampusmat.com>2022-02-15 20:27:51 +0100
commit5dae8f8d10d506abc3c75a1f66c1dfe620c84fc1 (patch)
tree2bfb6efef0535a35bab1da811a5f69cb5203dff9 /src/conversion.hpp
parent9147551cd21d565f9503e3ebbcd2121e284d88d5 (diff)
refactor: improve project design
Diffstat (limited to 'src/conversion.hpp')
-rw-r--r--src/conversion.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/conversion.hpp b/src/conversion.hpp
new file mode 100644
index 0000000..460a3ac
--- /dev/null
+++ b/src/conversion.hpp
@@ -0,0 +1,13 @@
+#pragma once
+
+#include <string>
+
+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(std::string str);