[libc-commits] [libc] [libc] Add support for 'string.h' locale variants (PR #105719)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Thu Aug 22 13:23:52 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:
should we add an assert to check that the locale passed is the default C locale?
https://github.com/llvm/llvm-project/pull/105719
More information about the libc-commits
mailing list