diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-11-22 09:47:20 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-11-25 08:43:59 +0100 |
commit | 07d2f1fd3e595aef539dc0443125bd08708e63ff (patch) | |
tree | 46342a8c5077e9ace36547428ee1f3fe1c580e9d /include | |
parent | d3e90b58e7a5cbb1b74da98aed9dd4ec18c84d77 (diff) | |
download | barebox-07d2f1fd3e595aef539dc0443125bd08708e63ff.tar.gz barebox-07d2f1fd3e595aef539dc0443125bd08708e63ff.tar.xz |
lib: implement wcsnlen
This will come in handy for implementing %ls in the follow up commit.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-19-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/wchar.h | 2 |
1 files changed, 2 insertions, 0 deletions
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); |