1:tolower() 函数说明:
检查参数c,为大写字母返回对应的小写字母

2:函数原型:
int toascii(int c)

3:函数参数:
参数c,为检测整数

4:返回值:
返回转换的小写字母,若无转换将参数c值返回

5:示例:
#include <ctype.h>
int main(){

char s[]="*aBcDeFgH12345;!#$";
int  i= 0;

printf("before tolower(): %s \n",s);

for( i=0; i< sizeof(s); i++){
    s[i]=tolower(s[i]);
}
printf("after tolower():%s \n", s );

return 0;
}

6:输出结果:

0ffa95b4033c4812a6e4eea10ecd762b.png

可参考toupper函数:https://mp.csdn.net/mp_blog/creation/editor?spm=1010.2135.3001.4503

更多推荐