Lately I've been experimenting with coding basic programs in C using Xcode, and I've found myself looking for ways to italicize text or make it bold or coloured. Despite the numerous similar posts on SO, there hasn't been one to prove helpful to my situation, however I've found many examples for this in C++ (if that means anything). Perhaps it's not possible to format text in C using Xcode?
Particularly, I've read about using ANSI escape coding, but when I use this code: printf("\033[32;1mTest")
, I end up with this as output: [32;1mTest
. I believe this is because ANSI escape coding is not intended to be used on MacOS (just Linux).
Specifically, I'm looking for a way to output formatted text to the console using printf
or some other method that prints text to the console, on a Mac. (Is this even possible?...)
Feel free to ask for any additional information as needed.