[libc-commits] [libc] [libc] Add support for 'string.h' locale variants (PR #105719)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Wed Aug 28 16:07:16 PDT 2024
================
@@ -0,0 +1,24 @@
+//===-- Implementation of strcoll_l ---------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/string/strcoll_l.h"
+
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+// TODO: Add support for locales.
+LLVM_LIBC_FUNCTION(int, strcoll_l,
+ (const char *left, const char *right, locale_t)) {
+ for (; *left && *left == *right; ++left, ++right)
----------------
michaelrj-google wrote:
That's fair, this is fine for now then. We should add something to the docs explaining that this is the behavior though.
https://github.com/llvm/llvm-project/pull/105719
More information about the libc-commits
mailing list