Bill Allombert on Fri, 19 Sep 2025 20:16:25 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: carriage return (\r) in printf()


On Fri, Sep 19, 2025 at 01:30:34PM -0400, Max Alekseyev wrote:
> Hello,
> 
> I've just noticed that printf() does not support carriage return character
> \r - can it be added?

Not in any timeframe that matter.

> Example:
> 
> ? printf("123456\r000")      \\ does not work as expected
> 123456r000
> ? printf("123456%s000",Strchr(13))      \\ workaround with expected output
> 000456

You can do
printf("123456\e[G000")

Cheers,
Bill