Skip to content

mbtowc : minimal multibyte to wide char converter

#include <stdlib.h>
int mbtowc(wchar_t *pwc, const char *s, size_t n);
```### Description
This is a minimal ANSI-conforming implementation of mbtowc. The only "multi-byte character sequences" recognized are single bytes, and they are "converted" to themselves.
Each call to mbtowc copies one character from *s to *pwc, unless s is a null pointer.
In this implementation, the argument n is ignored.### Returns
This implementation of mbtowc returns 0 if s is NULL; it returns 1 otherwise (reporting the length of the character "sequence" used).
---
**Authoritative source**: BUSMASTER DITA help source `mbtowc.dita`, compiled into `BUSMASTER.CHM` with the application.