wcsrchr(3)
π wcsrchr(3) β bestie's guide to finding the last wide character π
okay so like, this is a page from the Library Functions Manual and it's all about wcsrchr, one of those lil wide-character girlies from <wchar.h>. if you've ever been like "where did that character go LAST" β this is your moment. periodt.
β¨ NAME β¨
wcsrchr β search a wide character in a wide-character string π¦
π LIBRARY π
Standard C library (libc, -lc)
like yeah she lives in the main libc, no extra package needed, she's just there for you π
πΈ SYNOPSIS πΈ
#include <wchar.h>
wchar_t *wcsrchr(const wchar_t *wcs, wchar_t wc);
π DESCRIPTION π
okay so wcsrchr() is literally the wide-character equivalent of strrchr(3). same energy, wider characters. π«Ά
what it does: it searches for the last occurrence of wc in the wide-character string pointed to by wcs. not the first one. the last one. she's a backwards girly, she's looking from the end, iykyk. β¨
π₯ RETURN VALUE π₯
- if it finds
wc,wcsrchr()returns a pointer to the last occurrence ofwcin the wide-character string pointed to bywcsπ - if
wcdoes not occur in the string, you getNULL. that's it, that's the whole vibe check π no crash, no drama, justNULL.
π ATTRIBUTES π
for an explanation of the terms used in this section, see attributes(7).
- Interface:
wcsrchr() - Attribute: Thread safety
- Value:
MT-Safe
so like, multi-thread safe bestie, go off π§
β STANDARDS β
C11, POSIX.1-2008.
π HISTORY π
POSIX.1-2001, C99.
she's been iconic since forever, no cap.
π SEE ALSO π
strrchr(3)β the narrow-char sibling, same vibewcschr(3)β same but she finds the first one πΈ
lowkey reminder bestie:wcsrchrfinds the last match,wcschrfinds the first. don't mix them up, it's giving character-hunting chaos π
and that's the whole page!! this little gem comes from Linux man-pages 6.20, dated 2026-02-08, and yes the page itself is literally named wcsrchr(3). go forth and find your last wide character, you absolute main character πβ¨π¦
π¦ 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