1998-07-16から1日間の記事一覧

大文字・小文字の変換

C

明解C言語 入門編 > 9. 文字列の基本 > 大文字・小文字の変換 C #include <stdio.h> #include <ctype.h>void str_toupper(char st[]) { unsigned i = 0; while (st[i]) { st[i] = toupper(st[i]); i++; } }void str_tolower(char st[]) { unsigned i = 0; while (st[i]) { st[</ctype.h></stdio.h>…