wmemchr(3)
β¨ NAME β¨
wmemchr β okay so we're searching for a wide character inside a wide-character array π
and yeah hi bestie, this one lives in the Library Functions Manual, section 3 (wmemchr(3)), which is where all your C library function girlies hang out π«Ά
π LIBRARY π
Standard C library (libc, link it with -lc) β the OGs, the blueprint, no cap π
πΈ SYNOPSIS πΈ
#include <wchar.h>
wchar_t *wmemchr(size_t n;
const wchar_t s[n], wchar_t c, size_t n);
like that's literally it, that's the whole vibe β¨
π¦ DESCRIPTION π¦
okay so here's the tea: wmemchr() is the wide-character equivalent of memchr(3). Same energy, wider characters π«
What it does: it searches the n wide characters starting at s for the first occurrence of the wide character c. That's it. That's the whole plot. She finds your girl c, or she doesn't π―
π RETURN VALUE π
wmemchr() hands you back a pointer to the first occurrence of c among the n wide characters starting at s π«Ά
but if c is nowhere in that little lineup? You get NULL. Not found. Girl's not there. π
π ATTRIBUTES π
For an explanation of the terms used in this section, go peek at attributes(7) (she explains everything, iykyk) π
- Interface:
wmemchr() - Attribute: Thread safety
- Value:
MT-Safeπ₯
translation: multi-threaded? she's safe, bestie. go off π
β STANDARDS β
C11, POSIX.1-2008. Iconic standardized behaviour, periodt π
π HISTORY π
POSIX.1-2001, C99. Yeah she's been around, she's a legacy queen π
π SEE ALSO π
memchr(3)β the narrow-character sister, same vibe but byte-sizedwcschr(3)β the string-search cousin, also slaying β¨
and that's the whole page bestie!! π this was brought to you by Linux man-pages 6.20, dated 2026-02-08 β mwah, go search some wide chars, you've got this π¦ππ
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms