Converting an entire string to lowercase with tolower()
Posted on 2004-09-22
Does anybody know how to convert an entire string to lowercase? Would I have to run it through a for loop or will tolower() change the entire string. I can seem to get my prog to compiile no matter what I do....
length = endPos - startPos;
word = word.substr(startPos,length);
for(int j = 0; j < word.length(); j++)
word = word.tolower(word[j]);
cout << word << endl;