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

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

    For example, in code page 932, this includes the single-byte uppercase
    letters A-Z and the double-byte uppercase characters such that:


         0x8260 <= c <= 0x8279

    Note:  This function was called  jtolower in earlier versions.

Returns:
    The _mbctolower function returns the argument value if the argument is
    not a double-byte uppercase character; otherwise, the equivalent
    lowercase 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 */
        0x8260,     /* double-byte A */
        0x8261,     /* double-byte B */
        0x8262,     /* double-byte C */
        0x8263,     /* double-byte D */
        0x8264      /* 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 = _mbctolower( 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, _mbctombb, _mbctoupper, 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