jtolower.gml

来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 53 行

GML
53
字号
.func jtolower
#include <jstring.h>
JMOJI jtolower( JMOJI c );
.ixfunc2 '&CharTest' &func
.funcend
.desc begin
The &func function converts a double-byte uppercase character to an
equivalent double-byte lowercase character.
A double-byte uppercase character is any character for which the
following expression is true:
.millust begin
0x8260 <= c <= 0x8279
.millust end
.desc end
.return begin
The &func function returns the argument value if the argument is not a
double-byte uppercase character;
otherwise, the equivalent lowercase character is returned.
.return end
.see begin
.im seejto &function.
.see end
.exmp begin
#include <stdio.h>
#include <jstring.h>

JMOJI chars[] = {
    0x8260,
    0x8261,
    0x8262,
    0x8263,
    0x8264
};
.exmp break
#define SIZE sizeof( chars ) / sizeof( JMOJI )
.exmp break
void main()
  {
    int   i;
    JMOJI c;
.exmp break
    for( i = 0; i < SIZE; i++ ) {
        c = jtolower( chars[ i ] );
        printf( "%c%c", c>>8, c );
    }
    printf( "\n" );
  }
.exmp output
 a b c d e
.exmp end
.class WATCOM
.system

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?