I was wondering what were different ways to capitalize a string. This is one way I did it.
void capitalize(char letters[36]){ // function prototype
//char letters[] = "This sentence MUST be all capitals!";
for ( int i=0; i<32; i++){
if (letters[i] >='a')
letters[i]-= 32;
cout<< letters[i] ;
}
}
and then we called the function in main, but I was curious what if I wanted to only capitalize the first letters of each word. What would I do then?
Thanks for your help in advance