> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/man/string/wmemchr.3.md).

# wmemchr.3

`wmemchr` — 宽字符串操作

## 名称

`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`

## 库

Lb libc

## 概要

`#include <wchar.h>`

`Ft wchar_t * Fn wmemchr const wchar_t *s wchar_t c size_t n Ft int Fn wmemcmp const wchar_t *s1 const wchar_t *s2 size_t n Ft wchar_t * Fn wmemcpy wchar_t * restrict s1 const wchar_t * restrict s2 size_t n Ft wchar_t * Fn wmemmove wchar_t *s1 const wchar_t *s2 size_t n Ft wchar_t * Fn wmempcpy wchar_t * restrict s1 const wchar_t * restrict s2 size_t n Ft wchar_t * Fn wmemset wchar_t *s wchar_t c size_t n Ft wchar_t * Fn wcpcpy wchar_t * restrict s1 const wchar_t * restrict s2 Ft wchar_t * Fn wcpncpy wchar_t * restrict s1 const wchar_t * restrict s2 size_t n Ft int Fn wcscasecmp const wchar_t *s1 const wchar_t *s2 Ft wchar_t * Fn wcscat wchar_t * restrict s1 const wchar_t * restrict s2 Ft wchar_t * Fn wcschr const wchar_t *s wchar_t c Ft int Fn wcscmp const wchar_t *s1 const wchar_t *s2 Ft wchar_t * Fn wcscpy wchar_t * restrict s1 const wchar_t * restrict s2 Ft size_t Fn wcscspn const wchar_t *s1 const wchar_t *s2 Ft wchar_t * Fn wcsdup const wchar_t *s Ft size_t Fn wcslcat wchar_t *s1 const wchar_t *s2 size_t n Ft size_t Fn wcslcpy wchar_t *s1 const wchar_t *s2 size_t n Ft size_t Fn wcslen const wchar_t *s Ft int Fn wcsncasecmp const wchar_t *s1 const wchar_t *s2 size_t n Ft wchar_t * Fn wcsncat wchar_t * restrict s1 const wchar_t * restrict s2 size_t n Ft int Fn wcsncmp const wchar_t *s1 const wchar_t * s2 size_t n Ft wchar_t * Fn wcsncpy wchar_t * restrict s1 const wchar_t * restrict s2 size_t n Ft size_t Fn wcsnlen const wchar_t *s size_t maxlen Ft wchar_t * Fn wcspbrk const wchar_t *s1 const wchar_t *s2 Ft wchar_t * Fn wcsrchr const wchar_t *s wchar_t c Ft size_t Fn wcsspn const wchar_t *s1 const wchar_t *s2 Ft wchar_t * Fn wcsstr const wchar_t * restrict s1 const wchar_t * restrict s2`

## 描述

这些函数实现对宽字符串的字符串操作。详细描述请参阅相应的单字节对应函数的文档，例如 [memchr(3)](/man/string/memchr.3.md)。

## 参见

[memchr(3)](/man/string/memchr.3.md), [memcmp(3)](/man/string/memcmp.3.md), [memcpy(3)](/man/string/memcpy.3.md), [memmove(3)](/man/string/memmove.3.md), [memset(3)](/man/string/memset.3.md), stpcpy(3), stpncpy(3), [strcasecmp(3)](/man/string/strcasecmp.3.md), [strcat(3)](/man/string/strcat.3.md), [strchr(3)](/man/string/strchr.3.md), [strcmp(3)](/man/string/strcmp.3.md), [strcpy(3)](/man/string/strcpy.3.md), strcspn(3), [strdup(3)](/man/string/strdup.3.md), strlcat(3), [strlcpy(3)](/man/string/strlcpy.3.md), [strlen(3)](/man/string/strlen.3.md), strncat(3), strncmp(3), strncpy(3), strnlen(3), [strpbrk(3)](/man/string/strpbrk.3.md), strrchr(3), [strspn(3)](/man/string/strspn.3.md), [strstr(3)](/man/string/strstr.3.md)

## 标准

这些函数遵循 ISO/IEC 9899:1999 ("ISO C99")，但 `wcpcpy`、`wcpncpy`、`wcscasecmp`、`wcsdup`、`wcsncasecmp` 和 `wcsnlen` 遵循 IEEE Std 1003.1-2008 ("POSIX.1")，而 `wcslcat`、`wcslcpy` 和 `wmempcpy` 为扩展。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/man/string/wmemchr.3.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
