wcsspn(3)

wcsspn3

Wide character string manipulation operations

Part of wmemchr(3).

Usage

#include <wchar.h>

QWchar_t *

wmemchr(QWchar_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);

QWchar_t *

wcschr(QWchar_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);

QWchar_t *

wcspbrk(QWchar_t *s1, const wchar_t *s2);

QWchar_t *

wcsrchr(QWchar_t *s, wchar_t c);

size_t

wcsspn(const wchar_t *s1, const wchar_t *s2);

QWchar_t *

wcsstr(QWchar_t *s1, const wchar_t *s2);

Library

Standard C Library (libc, -lc)

Overview

The functions implement string manipulation operations over wide character strings. For a detailed description, refer to documents for the respective single-byte counterpart, such as memchr(3).

Releases

65 releases since FreeBSD 4.4-RELEASE; the text changed 40 times.

  1. 4.4
  2. 4.5–4.11
  3. 5.0–6.3
  4. 6.4
  5. 7.0
  6. 7.1
  7. 7.2
  8. 7.3
  9. 7.4
  10. 8.0
  11. 8.1
  12. 8.2
  13. 8.3
  14. 8.4
  15. 9.0
  16. 9.1
  17. 9.2
  18. 9.3
  19. 10.0
  20. 10.1
  21. 10.2
  22. 10.3
  23. 10.4
  24. 11.0
  25. 11.1
  26. 11.2
  27. 11.3
  28. 11.4
  29. 12.0
  30. 12.1
  31. 12.2
  32. 12.3
  33. 12.4
  34. 13.0
  35. 13.1–13.2
  36. 13.3
  37. 13.4–13.5
  38. 14.0
  39. 14.1–14.5
  40. 15.0–15.1
  41. 16.0

Standards

Functions wmemcmp(), wmemcpy(), wmemmove(), wmemset(), wcscat(), wcscmp(), wcscpy(), wcscspn(), wcslen(), wcsncat(), wcsncmp(), wcsncpy(), and wcsspn() conform to ISO/IEC 9899:1999 (“ISO C99”).

Functions wmemchr(), wcschr(), wcspbrk(), wcsrchr(), and wcsstr() conform to ISO/IEC 9899:2024 (“ISO C23”), where they are specified as qualifier-preserving functions.

Functions wcpcpy(), wcpncpy(), wcscasecmp(), wcsdup(), wcsncasecmp(), and wcsnlen() conform to IEEE Std 1003.1-2008 (“POSIX.1”), and functions wcslcat() and wcslcpy(), first introduced by OpenBSD, conform to IEEE Std 1003.1-2024 (“POSIX.1”).

Function wmempcpy() is a GNU extensions.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.