Isn't the function returning the text as its value?
No, at present it is returning nothing. And remember a char can only hold one character, not a series of characters, or a string. You probably want to change your function to return a string. And when you do this instead of printing the values in your function you will need to assign a value to a string variable to return to the calling function.