Hello! I am currently stuck in a programming practice question where I am required to call a function for converting all uppercase strings into lowercase without using the toLowercase() predefined function. If you could tell me what I am doing wrong in my code, I’d be really thankful!
PS. I am currently learning processing with 0 coding experience.
void setup ()
{
String str = "ENGG 233, Fall 2019, UCalgary";
String lowerStr = allLowercase (str);
println(lowerStr);
}
String allLowercase(String k)
{
for (int i = 0; i <= k.length(); i++)
{
if (k.charAt(i) >= 65 && k.charAt(i) <= 90)
{
print(k.charAt(i)+32);
}
println();
}
}