Is there a printf format to continue printing a string buffer until a certain character has been reached, almost like setting a character as a null terminator. I know there is something similar to this with scanf:
scanf("%[^\t]s", buf);
Basically it'll continue reading characters into "buf" until tab than enter is pressed.
Not that I know of. printf() prints C-strings, which are terminated with a null character. You could, I suppose, search the string beforehand and replace the character you want to stop at and replace it with a null character, or determine the size and print only a substring.