From 0c7420914d3b4c974366247170faf92dcfe88738 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 29 Mar 2023 19:13:48 -0500 Subject: [PATCH] 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. --- level_1/fl_string/c/string.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) 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. -- 1.8.3.1