summaryrefslogtreecommitdiff
path: root/minion/src/util.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'minion/src/util.hpp')
-rw-r--r--minion/src/util.hpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/minion/src/util.hpp b/minion/src/util.hpp
index d6f7f1c..4cc3967 100644
--- a/minion/src/util.hpp
+++ b/minion/src/util.hpp
@@ -8,12 +8,12 @@ namespace util
{
template <typename Type>
-Type *malloc(size_t size) noexcept
+auto malloc(size_t size) noexcept -> Type *
{
return static_cast<Type *>(::malloc(size));
}
-bool str_ends_with(const char *str, const char *other_str) noexcept;
+auto str_ends_with(const char *str, const char *other_str) noexcept -> bool;
/**
* Extracts a portion of a string.
@@ -24,4 +24,16 @@ bool str_ends_with(const char *str, const char *other_str) noexcept;
*/
void substr(const char *str, const char *end, char *dest) noexcept;
+/**
+ * Compares two strings.
+ *
+ * Wrapper function for strcmp.
+ *
+ * @param str_one The first string.
+ * @param str_two The second string.
+ *
+ * @returns Whether or not the two string are the same.
+ */
+auto streq(const char *str_one, const char *str_two) noexcept -> bool;
+
} // namespace util