%-50s


 
Thread Tools Search this Thread
Top Forums Programming %-50s
# 1  
Old 01-25-2008
%-50s

Hello,

what mean %-50s ?


example


(void) fprintf(file,"50%-s %s\n",pin,pinname);

thanks
# 2  
Old 01-25-2008
You can experiment from the command line with the printf command
Code:
csadev:/home/jmcnama> printf "%-50s\n" "hi there"
hi there
csadev:/home/jmcnama> printf "%50s\n" "hi there"
                                          hi there

It left justifies text, pads to 50 character length with spaces , %s is a format specifier for printf.
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question