# Help with functions

**URL:** <https://discourse.processing.org/t/help-with-functions/14885>\
**Category:** Coding Questions\
**Created:** [October 23, 2019, 1:28am UTC](https://discourse.processing.org/t/help-with-functions/14885 "2019-10-23T01:28:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [October 23, 2019, 1:36am UTC](https://discourse.processing.org/t/help-with-functions/14885/2 "2019-10-23T01:36:00Z")

</div>

i think i see the same home work here last week,  
did you use search here ( or google search ) already?

hope it helps: [Calling a function for making a string lowercase without predefined function](https://discourse.processing.org/t/calling-a-function-for-making-a-string-lowercase-without-predefined-function/14775)

* * *

possibly only the program flow,  
while the rest looks good

```auto
void setup () {
  String str = "ABCD 123, Fall 2019, Pizza";
  println(str);
  String lowerStr = allLowercase(str);
  println(lowerStr);
}

String allLowercase(String str) {
  String res="";
  char c;
  for (int i = 0; i < str.length(); ++i) {
    c = str.charAt(i);
    if (c >= 'A' && c <= 'Z') c=(char)(c+32);
    res = res+c;
  }
  return res;
}

```

---

_[View the full topic](https://discourse.processing.org/t/help-with-functions/14885)._
