Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <mbstring.h>
    int _ismbcspace( unsigned int ch );

Description:
    The _ismbcspace function tests for any multibyte space character.
     Multibyte characters include both single-byte and double-byte
    characters.  For example, in code page 932, the double-byte space
    character is 0x8140.

Returns:
    The _ismbcspace function returns a non-zero value when the argument is a
    member of this set of characters; otherwise, zero is returned.


Example:
    #include <stdio.h>
    #include <mbctype.h>
    #include <mbstring.h>

    unsigned int chars[] = {
        0x09,
        '.',
        ' ',
        '1',
        'A',
        0x8140, /* double-byte space */
        0x8143, /* double-byte , */
        0x8254, /* double-byte 5 */
        0x8260, /* double-byte A */
        0x8279, /* double-byte Z */
        0x8281, /* double-byte a */
        0x829A, /* double-byte z */
        0x989F, /* double-byte L2 character */
        0xA6
    };

    #define SIZE sizeof( chars ) / sizeof( unsigned int )

    void main()
      {
        int   i;

        _setmbcp( 932 );
        for( i = 0; i < SIZE; i++ ) {
          printf( "%#6.4x is %sa valid "
                "multibyte space character\n",
                chars[i],
                ( _ismbcspace( chars[i] ) ) ? "" : "not " );
        }
      }

    produces the following:

    0x0009 is a valid multibyte space character
    0x002e is not a valid multibyte space character
    0x0020 is a valid multibyte space character
    0x0031 is not a valid multibyte space character
    0x0041 is not a valid multibyte space character
    0x8140 is a valid multibyte space character
    0x8143 is not a valid multibyte space character
    0x8254 is not a valid multibyte space character
    0x8260 is not a valid multibyte space character
    0x8279 is not a valid multibyte space character
    0x8281 is not a valid multibyte space character
    0x829a is not a valid multibyte space character
    0x989f is not a valid multibyte space character
    0x00a6 is not a valid multibyte space character

Classification:
    WATCOM

Systems:
    DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    _getmbcp, _ismbcalnum, _ismbcalpha, _ismbccntrl, _ismbcdigit,
    _ismbcgraph, _ismbchira, _ismbckata, _ismbcl0, _ismbcl1, _ismbcl2,
    _ismbclegal, _ismbclower, _ismbcprint, _ismbcpunct, _ismbcsymbol,
    _ismbcupper, _ismbcxdigit, _mbbtype, _setmbcp

See Also: _getmbcp _ismbcalnum

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson