Program Language/C++
(C++) tolower, toupper 대소문자 변환
ji.o.n.e
2021. 1. 30. 21:19
- tolower: 대문자를 소문자로 변환
- toupper: 소문자를 대문자로 변환
#include <string>
#include <iostream>
using namespace std;
int main()
{
string str = "Hello World";
for(int i=0; i<str.length(); i++)
{
str[i] = toupper(str[i]);
}
}