_strupr _wcsupr _mbsupr

将字符串转化为大写的形式(Convert a string to uppercase.)
定义:

char *_strupr( char *string );

wchar_t *_wcsupr( wchar_t *string );

unsigned char *_mbsupr( unsigned char *string );

注意事项:

函数自动将传入的字符变为大写的形式,返回指针和string是一样的,因此可以不使用返回值

These functions return a pointer to the altered string. Because the modification is done in place, the pointer returned is the same as the pointer passed as the input argument. No return value is reserved to indicate an error.

举例说明:这里使用安全函数

void main()

{

   char string[100] = "The String to End All Strings!";
   char *copy1, *copy2;
 

   copy1 =  _strupr(string);//copy1 与string的地址相同,此时字符串都转化为大写
   copy2 = _strlwr(string);//copy2 与copy1 还有string的地址相同,此时字符串都转化为小写



   _strupr_s(string);  //使用安全函数又转化为大写,不需要返回值了,以后编程中推荐使用

}
原文地址:https://www.cnblogs.com/priarieNew/p/9754479.html