• 1.摘要
  • 2.基本信息
  • 3.基本内容

tolower

函数名:tolower功能:把字符转换成小写字母,非字母字符不做出处理头文件:在VC6.0可以是ctype.h或者stdlib.h,常用ctype.h用法:inttolower(intc);说明:和函数int_tolower(intc);功能一样,但是_tolower在VC6.0中头文件要用ctype.hC程序例:#include#include#include#includeintmain(){intlength,i;charstring[]="THISISASTRING";length=strlen(string);printf("%s\n",string);for(i=0;i#include#includeusingnamespacestd;intmain(){stringstr="THISISASTRING";for(inti=0;i<<

基本信息

  • 外文名

    tolower

  • 简介

    功 能: 把字符转换成小

  • 头文件

    在VC6.0可以是ctype.h

  • 用法

    int tolower(int c);

基本内容

函数名: tolower

功 能: 把 字符转换成小写字母,非字母字符不做出处理

头文件:在VC6.0可以是 ctype.h或者 stdlib.h,常用ctype.h

用 法: int tolower(int c);

说明:和函数int _tolower( int c );功能一样,但是_tolower在VC6.0中头文件要用 ctype.h

C程序例:

#include<string.h>

#include<stdio.h>

#include<ctype.h>

#include<stdlib.h>

int main()

{int length, i;

char string[]="THIS IS A STRING";

length=strlen(string);

printf("%s\n",string);

for(i=0;i<length;i++)

{string[i] = tolower(string[i]);

}