WMEMCHR(3)
๐ WMEMCHR(3) โ bestie edition ๐
okay so this is WMEMCHR(3), a.k.a. the whole wide-character string manipulation squad, all hanging out in one manpage like it's a group chat ๐ซถ
โจ NAME โจ
wmemchr, wmemcmp, wmemcpy, wmemmove, wmempcpy, wmemset, wcpcpy, wcpncpy, wcscasecmp, wcscat, wcschr, wcscmp, wcscpy, wcscspn, wcsdup, wcslcat, wcslcpy, wcslen, wcsncasecmp, wcsncat, wcsncmp, wcsncpy, wcsnlen, wcspbrk, wcsrchr, wcsspn, wcsstr โ wide character string manipulation operations ๐ฆ
literally 27 little icons doing string stuff but for wide characters. the way they all start with w... it's giving matching bestie bracelets ๐
๐ LIBRARY ๐
Standard C Library (libc, -lc) โ like, the standard-est of standard libraries, no cap.
๐ SYNOPSIS ๐
#include <wchar.h>
wchar_t *
wmemchr(const wchar_t *s, wchar_t c, size_t n);
int
wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n);
wchar_t *
wmemcpy(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n);
wchar_t *
wmemmove(wchar_t *s1, const wchar_t *s2, size_t n);
wchar_t *
wmempcpy(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n);
wchar_t *
wmemset(wchar_t *s, wchar_t c, size_t n);
wchar_t *
wcpcpy(wchar_t * restrict s1, const wchar_t * restrict s2);
wchar_t *
wcpncpy(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n);
int
wcscasecmp(const wchar_t *s1, const wchar_t *s2);
wchar_t *
wcscat(wchar_t * restrict s1, const wchar_t * restrict s2);
wchar_t *
wcschr(const wchar_t *s, wchar_t c);
int
wcscmp(const wchar_t *s1, const wchar_t *s2);
wchar_t *
wcscpy(wchar_t * restrict s1, const wchar_t * restrict s2);
size_t
wcscspn(const wchar_t *s1, const wchar_t *s2);
wchar_t *
wcsdup(const wchar_t *s);
size_t
wcslcat(wchar_t *s1, const wchar_t *s2, size_t n);
size_t
wcslcpy(wchar_t *s1, const wchar_t *s2, size_t n);
size_t
wcslen(const wchar_t *s);
int
wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n);
wchar_t *
wcsncat(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n);
int
wcsncmp(const wchar_t *s1, const wchar_t * s2, size_t n);
wchar_t *
wcsncpy(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n);
size_t
wcsnlen(const wchar_t *s, size_t maxlen);
wchar_t *
wcspbrk(const wchar_t *s1, const wchar_t *s2);
wchar_t *
wcsrchr(const wchar_t *s, wchar_t c);
size_t
wcsspn(const wchar_t *s1, const wchar_t *s2);
wchar_t *
wcsstr(const wchar_t * restrict s1, const wchar_t * restrict s2);
note the restrict keywords bestie, they're doing a whole vibe check on aliasing. copy them exactly, don't get cute with it ๐
๐ง DESCRIPTION ๐ง
so these functions implement string manipulation operations over wide character strings. that's the whole bit. โจ
for a detailed description, refer to documents for the respective single-byte counterpart, such as memchr(3) ๐
basically: every w-prefixed icon here is the wide-char twin of a regular byte-string function, and the regular one's manpage is where the real lore lives. this page is more like the group photo than the individual photo dumps, iykyk ๐
๐ธ SEE ALSO ๐ธ
the whole extended friend group, go say hi:
memchr(3)memcmp(3)memcpy(3)memmove(3)memset(3)stpcpy(3)stpncpy(3)strcasecmp(3)strcat(3)strchr(3)strcmp(3)strcpy(3)strcspn(3)strdup(3)strlcat(3)strlcpy(3)strlen(3)strncat(3)strncmp(3)strncpy(3)strnlen(3)strpbrk(3)strrchr(3)strspn(3)strstr(3)
๐ STANDARDS ๐
these functions conform to ISO/IEC 9899:1999 (โISO C99โ), with the exception of:
wcpcpy(),wcpncpy(),wcscasecmp(),wcsdup(),wcsncasecmp(), andwcsnlen(), which conform toIEEE Std 1003.1-2008(โPOSIX.1โ)wcslcat(),wcslcpy(), andwmempcpy(), which are extensions ๐ซถ
fr fr clock the exceptions, bestie โ not everything here is straight ISO C99 and the page is very much telling you so ๐
and that's the page!! brought to you by the Debian girlies โจ, dated March 21, 2024, filed under WMEMCHR(3) โ stan the wide chars, drink some water, and go read memchr(3) if you want the actual lore ๐๐
๐ฆ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 1990, 1991, 1993 The Regents of the University of California. All rights reserved
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms