From ec20c707ea677c9b2c8e585b78c9837a2f6e7372 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 30 May 2022 13:11:38 +0200 Subject: refactor(minion): make reading wifi module more reliable --- minion/src/util.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'minion/src/util.hpp') diff --git a/minion/src/util.hpp b/minion/src/util.hpp index 0dbb03f..2955cf1 100644 --- a/minion/src/util.hpp +++ b/minion/src/util.hpp @@ -13,7 +13,15 @@ auto malloc(size_t size) noexcept -> Type * return static_cast(::malloc(size)); } -auto str_ends_with(const char *str, const char *other_str) noexcept -> bool; +/** + * Returns whether or not a string ends with the content of another string. + * + * @param target The string to compare the end of. + * @param target_end The end position of the target string. + * @param other The string to compare with. + */ +auto str_ends_with(const char *target, size_t target_end, const char *other) noexcept + -> bool; /** * Extracts a portion of a string. @@ -32,7 +40,7 @@ void substr(const char *str, const char *end, char *dest) noexcept; * @param str_one The first string. * @param str_two The second string. * - * @returns Whether or not the two string are the same. + * @returns Whether or not the two strings contain the same content. */ auto streq(const char *str_one, const char *str_two) noexcept -> bool; -- cgit v1.2.3-18-g5258