跳转到内容

wctomb : 最小宽字符到多字节转换器

#include <stdlib.h>
int wctomb(char *s, wchar_t wchar);
```### 描述
这是 wctomb 的一个最小 ANSI 兼容实现。唯一可识别的“宽字符”是单字节,并且它们被“转换”为它们自身。
每次调用 wctomb 都会将字符 wchar 复制到 *s,除非 s 是一个空指针。### 返回值
此 wctomb 实现在 s 为 NULL 时返回 0;否则返回 1(报告生成的字符“序列”的长度)。
---
**权威来源**: BUSMASTER DITA help source `wctomb.dita`, compiled into `BUSMASTER.CHM` with the application.