From: Kevin Day Date: Thu, 30 Mar 2023 00:13:48 +0000 (-0500) Subject: Bugfix: Add missing function fl_string_dynamic_partial_compare_trim(). X-Git-Tag: 0.6.5~25 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=0c7420914d3b4c974366247170faf92dcfe88738;p=fll Bugfix: Add missing function fl_string_dynamic_partial_compare_trim(). The function declaration is missing from the header. This is technically an API change but because the function actually exists and is defined there is no ABI change. This is discovered by back porting some unit tests. --- diff --git a/level_1/fl_string/c/string.h b/level_1/fl_string/c/string.h index f1802c9..c5f28d2 100644 --- a/level_1/fl_string/c/string.h +++ b/level_1/fl_string/c/string.h @@ -705,6 +705,36 @@ extern "C" { #endif // _di_fl_string_dynamic_partial_compare_string_ /** + * Compare two strings, similar to strncmp(), but restricted to the given ranges. + * + * This does not stop on NULL. + * NULL characters are ignored. + * Ignores leading and trailing whitespace. + * + * @param string1 + * String to compare. + * @param string2 + * String to compare. + * @param range2 + * A range within the string2 to restrict the comparison to. + * + * @return + * F_equal_to when both strings equal. + * F_equal_to_not when both strings do not equal. + * + * F_parameter (with error bit) if a parameter is invalid. + * + * F_parameter (with error bit) from: f_utf_is_combining(). + * F_parameter (with error bit) from: f_utf_is_whitespace(). + * + * @see f_utf_is_combining() + * @see f_utf_is_whitespace() + */ +#ifndef _di_fl_string_dynamic_partial_compare_trim_ + extern f_status_t fl_string_dynamic_partial_compare_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2); +#endif // _di_fl_string_dynamic_partial_compare_trim_ + +/** * Compare two strings, similar to strncmp(), but restricted to the given range for the second string. * * This does not stop on NULL.