Loose-Info.com
Last Update 2012/07/05
TOP - C言語 - ctype.h - toupper()

引数で与えられた文字がアルファベットの小文字の場合、大文字に変換します。

 戻り値1  = toupper(  引数1  )

戻り値1 :
int
引数1がアルファベットの小文字
対応する大文字
上記以外
引数1
引数1 :
int
変換の対象となるASCII文字

(例)
#include <stdio.h> #include <ctype.h> int main () { int c; int c_ret; printf("toupper()結果\n"); for (c=0x40; c<0x80; c=c+4) { c_ret = toupper(c); printf("[%02X] : %c\n", c, c_ret); } return 0; }

実行結果
toupper()結果 [40] : @ [44] : D [48] : H [4C] : L [50] : P [54] : T [58] : X [5C] : \ [60] : ` [64] : D [68] : H [6C] : L [70] : P [74] : T [78] : X [7C] : |