C
christian.bongiorno
I need to format a string and I would like to do it in 1 line
char buff[32];
I need something LIKE:
sprintf(buff,"[%-32s]",value); // space pad up to 32 chars
with the caveat it CANNOT be null terminated. I am sure there is a way
-- I just don't know it
So, in words, I need to stick a string into a predefined buffer, left
justified and padded with spaces, total length no longer than 32 (to
not run ove rmemory) and it must not be null terminated.
Christian
char buff[32];
I need something LIKE:
sprintf(buff,"[%-32s]",value); // space pad up to 32 chars
with the caveat it CANNOT be null terminated. I am sure there is a way
-- I just don't know it
So, in words, I need to stick a string into a predefined buffer, left
justified and padded with spaces, total length no longer than 32 (to
not run ove rmemory) and it must not be null terminated.
Christian