You can use sprintf/snprintf to first store a line in a text buffer and next print that text buffer. The below demonstrates using serial monitor.
// text buffer; size is for 16 characters plus terminating '\0'
char buffer[17];
void setup()
{
Serial.begin(57600);
}
void loop()
{
static int counter = 0x7FFF;
snprintf(buffer, sizeof(buffer), "'%-5s' '%6d'", "txt", counter++);
Serial.println(buffer);
delay(1500);
}
This will print as shown below. For clarity, the code wastes some space. %-5s will print a text with a minimum of 5 characters, left aligned. %6d prints a signed integer with a minimum of 6 positions; reason for 6 positions is that a signed integer is a maximum of 5 digits and a minus sign. You can start the counter at 0 to see the effect.
The total length should not exceed 20 characters or the result will be truncated at the end.; I've wasted tome space with the single ticks and the additional space.