[libc] wcscspn implementation (#146158)

Implemented wcscspn and tests.

---------

Co-authored-by: Sriya Pratipati <sriyap@google.com>
This commit is contained in:
sribee8
2025-07-01 15:56:09 +00:00
committed by GitHub
parent 04c614327c
commit 47e28d9cd1
9 changed files with 174 additions and 0 deletions

View File

@@ -5815,6 +5815,18 @@ libc_function(
],
)
libc_function(
name = "wcscspn",
srcs = ["src/wchar/wcscspn.cpp"],
hdrs = ["src/wchar/wcscspn.h"],
deps = [
":__support_common",
":__support_macros_config",
":types_size_t",
":types_wchar_t",
],
)
libc_function(
name = "wcslen",
srcs = ["src/wchar/wcslen.cpp"],

View File

@@ -73,6 +73,16 @@ libc_test(
],
)
libc_test(
name = "wcscspn_test",
srcs = ["wcscspn_test.cpp"],
deps = [
"//libc:types_size_t",
"//libc:types_wchar_t",
"//libc:wcscspn",
],
)
libc_test(
name = "wcslen_test",
srcs = ["wcslen_test.cpp"],