I want to make a function that converts a string unformatted into one in lowercase but the first character in uppercase, like,if the string is:
"lOOk, a TRhEe heAded MonkEy", it would return:
"Look, a three headed monkey".
i thought of putting all in lowercase with "StrToLowerCase",
getting the first character with "StrGetCharAt", putting this character in uppercase and replace the first character with "StrSetCharAt".
BUT the main problem is that StrSetCharAt gets the character that have to replace the other as an integer, so i dont know if there is a way to do it.
Any ideas?
function ChangeStrCase(string str){
char S;
StrToUpperCase(str);
S=StrGetCharAt (str,0);
StrToLowerCase(str);
StrSetCharAt(str,0,S);
}
QuoteBUT the main problem is that StrSetCharAt gets the character that have to replace the other as an integer, so i dont know if there is a way to do it.
Don't worry about. You can pass an integer representing a character.
-Cheers