[libc-commits] [libc] [libc] Add support for 'string.h' locale variants (PR #105719)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Thu Aug 22 13:31:39 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)
----------------
jhuber6 wrote:
Do we expose asserts in entrypoints? I'm unsure if people would prefer it be ignored or terminate their program.
https://github.com/llvm/llvm-project/pull/105719
More information about the libc-commits
mailing list