XDrawString and carriage returns
All, I am writing using XLib to write a little app. And I've been using XDrawString to display text.
However I've come across a situation where I want to display a string with embedded carriage returns:
char *str = "Hello there.\n How are you today?";
However when I display the string using XDrawString the carriage return doesn't translate and the multiple lines get displayed on a single line
Hello there. How are you today?
How are you today?
Can anyone point me to a function that WILL properly display the carriage return, or perhaps is there a different way to encode the carriage return so that XDrawString will planes the lines each on their own line? Or am I stuck breaking the strings apart and displaying them one after the other?
Thanks for any advice,