Here's a c++ library snippet that could be useful for string formatting (sorry, can't find how to add code tags):
#ifndef STRINGFORMAT_H
#define STRINGFORMAT_H
const char newln { '\n' };
const char tab { '\t' };
const char bs { '\b' };
const char apo { '\'' };
const char quote { '\"' };
const char questn { '\?' };
const char bslash { '\\' };
#endif