WMEMCHR(3)

๐Ÿ“ฆ
version 15.1 ยท 2 versions
, in freebsd 15.1

๐Ÿ’… 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:


๐Ÿ‘‘ STANDARDS ๐Ÿ‘‘

these functions conform to ISO/IEC 9899:1999 (โ€œISO C99โ€), with the exception of:

  • wcpcpy(), wcpncpy(), wcscasecmp(), wcsdup(), wcsncasecmp(), and wcsnlen(), which conform to IEEE Std 1003.1-2008 (โ€œPOSIX.1โ€)
  • wcslcat(), wcslcpy(), and wmempcpy(), 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
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms