1. stricmp 比较字符串,不区分大小写。#include<string>
http://baike.baidu.com/view/745150.htm
string str1 ,str2 ;
bool bijiao = stricmp( str1 , str2 ) ;
//if ( bijiao < 0 ) , str1 < str2;
字符串的大小写转换
1.stl
#include<algorighm>
#include<string>
#include<一种stl容器(set/vector)>
set<string>str ;
transform( str.begin() , str.end() , str.begin() , tolower/toupper ) ;
http://www.cnblogs.com/oomusou/archive/2006/12/10/587749.html
http://blog.youkuaiyun.com/liziyun537/archive/2010/11/04/5988058.aspx
2. tolower
#include<cstype.h>
#include<string>
string str ;
for( int i = 0 ; i < str.size() ; i++ )
{
str[ i ] = tolower( str[ i ] ) ;
}