Name

mbsinit - tests for initial shift state

Library

libc.lib

Synopsis

  #include <wchar.h>
  int mbsinit (const mbstate_t *ps);

Return values

The mbsinit function returns non-zero if ps is NULL or describes an initial conversion state, otherwise it returns zero.

Detailed description

The mbsinit function determines whether the mbstate_t object pointed to by ps describes an initial conversion state.

The behavior of the mbsinit is affected by LC_CTYPE category of the current locale.


Examples

#include <stdlib.h>
#include <wchar.h>
/* Illustrates how to use mbsinit API */
int example_mbsinit(void)
{
 mbstate_t mbs;
 int state;
 
 /* testing for the initial state */
 state = mbsinit(&mbs);
 /* return the state */
 return(state);
}

         


Limitations

The current implementation of mbsinit is not affected by the LC_CTYPE category of the current locale. It works only for UTF8 character set.

See also

mbrlen, mbrtowc, mbsrtowcs, wcrtomb, wcsrtombs

Feedback

For additional information or queries on this page send feedback

© 2005-2007 Nokia

Top