[libc-commits] [libc] [libc][wchar] implement wcslen (PR #124150)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Thu Jan 23 09:16:29 PST 2025
================
@@ -0,0 +1,29 @@
+//===-- Wide String utils -------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_WCHAR_WIDE_STRING_UTILS_H
+#define LLVM_LIBC_SRC_WCHAR_WIDE_STRING_UTILS_H
+
+#include "src/__support/macros/config.h"
+#include "hdr/types/size_t.h"
+#include "hdr/types/wchar_t.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace internal {
+
+LIBC_INLINE size_t wide_string_length(const wchar_t *src) {
----------------
jhuber6 wrote:
Couldn't we just overload the existing`string_length` helper?
https://github.com/llvm/llvm-project/pull/124150
More information about the libc-commits
mailing list