[libc-commits] [libc] [libc][wchar] implement wcslen (PR #124150)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Thu Jan 23 09:30:59 PST 2025


================
@@ -96,7 +97,7 @@ LIBC_INLINE size_t string_length(const char *src) {
   // string a block at a time.
   return string_length_wide_read<unsigned int>(src);
----------------
jhuber6 wrote:

Do we need to template the `string_length` function as well? I would assume we'd just have `internal::string_length` and it works for any string. Also might need to handle the wide read case or just `if constexpr` the type.

https://github.com/llvm/llvm-project/pull/124150


More information about the libc-commits mailing list