strupr函数

2019-06-03

15:13:39

strupr()函数!

strupr,函数的一种,将字符串s转换为大写形式。

说明:只转换s中出现的小写字母,不改变其它字符。返回指向s的指针
兼容性说明:strupr不是标准C库函数,只能在VC中使用。在linux gcc环境下需要自行定义这个函数。
例子:
#include <bits/stdc++.h>
using namespace std;
int main()
{
    char a[100];
    gets(a);
    char * s2 = strupr(a);
    cout << s2;
    return 0;
}
 
原文地址:https://www.cnblogs.com/Artimis-fightting/p/10967740.html