1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/base/Unit.cc
12 #include "zypp/base/String.h"
14 #include "zypp/base/Unit.h"
16 ///////////////////////////////////////////////////////////////////
18 { /////////////////////////////////////////////////////////////////
19 ///////////////////////////////////////////////////////////////////
21 { /////////////////////////////////////////////////////////////////
23 std::string Unit::form( double val_r,
24 const std::string & symbol_r,
25 unsigned field_width_r,
26 unsigned unit_width_r,
29 std::string ret = str::form( "%*.*f", field_width_r, prec_r, val_r );
32 ret += str::form( " %*s", unit_width_r, symbol_r.c_str() );
37 /////////////////////////////////////////////////////////////////
39 ///////////////////////////////////////////////////////////////////
40 /////////////////////////////////////////////////////////////////
42 ///////////////////////////////////////////////////////////////////