diff options
author | HampusM <hampus@hampusmat.com> | 2022-05-30 13:11:38 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-05-30 13:11:38 +0200 |
commit | ec20c707ea677c9b2c8e585b78c9837a2f6e7372 (patch) | |
tree | 6499124c7f7cd1d3da12afb60ab9f65f7782d228 /minion/src/util.hpp | |
parent | d95ce9a08977b82fe6f331f110c218044b9f41cb (diff) |
refactor(minion): make reading wifi module more reliable
Diffstat (limited to 'minion/src/util.hpp')
-rw-r--r-- | minion/src/util.hpp | 12 |
1 files changed, 10 insertions, 2 deletions
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<Type *>(::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; |