From 07d2f1fd3e595aef539dc0443125bd08708e63ff Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 22 Nov 2021 09:47:20 +0100 Subject: lib: implement wcsnlen This will come in handy for implementing %ls in the follow up commit. Signed-off-by: Ahmad Fatoum Link: https://lore.barebox.org/20211122084732.2597109-19-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- include/wchar.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/wchar.h b/include/wchar.h index fb9b127a8c..392211039a 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -17,6 +17,8 @@ char *strdup_wchar_to_char(const wchar_t *src); size_t wcslen(const wchar_t *s); +size_t wcsnlen(const wchar_t *s, size_t maxlen); + #define MB_CUR_MAX 4 int mbtowc(wchar_t *pwc, const char *s, size_t n); -- cgit v1.2.3