Reply to comment
Variable column widths, string lengths in printf-style functions
I have been programming in C for quite some time, but until recently I was not aware that you could specify column widths and string limits using variables. I have neither seen this functionality used in any projects until I started working with OpenSER.
Specify a variable column width:
printf("%*d", width, number);
Specify a variable number of characters from a string:
printf("%.*s", width, string);
Recent comments
1 week 4 days ago
4 weeks 20 hours ago
4 weeks 23 hours ago
4 weeks 1 day ago
4 weeks 1 day ago
5 weeks 2 days ago
8 weeks 2 days ago
10 weeks 4 days ago
12 weeks 2 days ago
12 weeks 3 days ago