-
Boost Format
I was wondering if anyone knows the proper syntax for padding with 0s using Boost.Format. I am trying to get HH:MM:SS, and I have the following:
Code:
typedef boost::basic_format<TCHAR> tformat;
tformat(_T("%1%:%2%:%3%")) % Data.EtaHours % Data.EtaMinutes % Data.EtaSeconds));
This will give H:M:S, though.
Any ideas? The boost documentation can be so bad at times.
-
How about this from boost?
Code:
%{nt} , where n is a positive number, inserts an absolute tabulation. It means that format will, if needed, fill the string with characters, until the length of the string created so far reaches n characters
-
-
Hmmm. Good question. It might be able to work. I could at least try.