On 07.10.22 01:15, Jeff Davis wrote:
+ * Call ucol_strcollUTF8(), ucol_strcoll(), strcoll(), strcoll_l(), wcscoll(), + * or wcscoll_l() as appropriate for the given locale, platform, and database + * encoding. Arguments must be NUL-terminated. If the locale is not specified, + * use the database collation. + * + * If the collation is deterministic, break ties with memcmp(), and then with + * the string length. + */ +int +pg_strcoll(const char *arg1, int len1, const char *arg2, int len2, + pg_locale_t locale)
It's a bit confusing that arguments must be NUL-terminated, but the length is still specified. Maybe another sentence to explain that would be helpful.
The length arguments ought to be of type size_t, I think.