Contents|Index|Previous|Next

mmbtowc
[minimal multibyte to wide char converter]

SYNOPSIS
#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 “multibyte 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).

COMPLIANCE
mbtowc is required in the ANSI C standard. However, the precise effects vary with the locale.

mbtowc requires no supporting OS subroutines.