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>
    unsigned int _mbctoupper( unsigned int c );

Description:
    The _mbctoupper function converts a lowercase multibyte character to an
    equivalent uppercase multibyte character.

    For example, in code page 932, this includes the single-byte lowercase
    letters a-z and the double-byte lowercase characters such that:


         0x8281 <= c <= 0x829A

    Note:  This function was called  jtoupper in earlier versions.

Returns:
    The _mbctoupper function returns the argument value if the argument is
    not a double-byte lowercase character; otherwise, the equivalent
    uppercase character is returned.


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

    unsigned int chars[] = {
        'a',        /* single-byte a */
        'b',        /* single-byte b */
        'c',        /* single-byte c */
        'd',        /* single-byte d */
        'e',        /* single-byte e */
        0x8281,     /* double-byte a */
        0x8282,     /* double-byte b */
        0x8283,     /* double-byte c */
        0x8284,     /* double-byte d */
        0x8285      /* double-byte e */
    };

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

    void main()
      {
        int   i;
        unsigned int c;

        _setmbcp( 932 );
        for( i = 0; i < SIZE; i++ ) {
          c = _mbctoupper( chars[ i ] );
          if( c > 0xff )
            printf( "%c%c", c>>8, c );
          else
            printf( "%c", c );
        }
        printf( "\n" );
      }

    produces the following:

    ABCDE A B C D E

Classification:
    WATCOM

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

See Also:
    _mbccmp, _mbccpy, _mbcicmp, _mbcjistojms, _mbcjmstojis, _mbclen,
    _mbctohira, _mbctokata, _mbctolower, _mbctombb, mblen, mbrlen, mbrtowc,
    mbsrtowcs, mbstowcs, mbtowc, sisinit, wcrtomb, wcsrtombs, wcstombs,
    wctob, wctomb

See Also: _mbcjistojms _mbcjmstojis

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