rapidyaml  0.16.0
parseandemitYAML,anddoitfast
Pad the number with zeroes on the left

Functions

template<class T >
integral_padded_< T > c4::fmt::zpad (T val, size_t num_digits)
 pad the argument with zeroes on the left, with decimal radix More...
 
template<class T >
integral_padded_< T > c4::fmt::zpad (integral_< T > val, size_t num_digits)
 pad the argument with zeroes on the left More...
 
integral_padded_< intptr_t > c4::fmt::zpad (std::nullptr_t, size_t num_digits)
 pad the argument with zeroes on the left More...
 
template<class T >
integral_padded_< intptr_t > c4::fmt::zpad (T const *val, size_t num_digits)
 pad the argument with zeroes on the left More...
 
template<class T >
integral_padded_< intptr_t > c4::fmt::zpad (T *val, size_t num_digits)
 

Detailed Description

Function Documentation

template<class T >
integral_padded_<T> c4::fmt::zpad ( T  val,
size_t  num_digits 
)
inline

pad the argument with zeroes on the left, with decimal radix

Definition at line 232 of file format.hpp.

Referenced by sample_formatting().

233 {
234  return integral_padded_<T>(val, T(10), num_digits);
235 }
template<class T >
integral_padded_<T> c4::fmt::zpad ( integral_< T >  val,
size_t  num_digits 
)
inline

pad the argument with zeroes on the left

Definition at line 238 of file format.hpp.

239 {
240  return integral_padded_<T>(val.val, val.radix, num_digits);
241 }
integral_padded_<intptr_t> c4::fmt::zpad ( std::nullptr_t  ,
size_t  num_digits 
)
inline

pad the argument with zeroes on the left

Definition at line 243 of file format.hpp.

244 {
245  return integral_padded_<intptr_t>(0, 16, num_digits);
246 }
template<class T >
integral_padded_<intptr_t> c4::fmt::zpad ( T const *  val,
size_t  num_digits 
)
inline

pad the argument with zeroes on the left

Definition at line 249 of file format.hpp.

250 {
251  return integral_padded_<intptr_t>(reinterpret_cast<intptr_t>(val), 16, num_digits);
252 }
template<class T >
integral_padded_<intptr_t> c4::fmt::zpad ( T *  val,
size_t  num_digits 
)
inline

Definition at line 254 of file format.hpp.

255 {
256  return integral_padded_<intptr_t>(reinterpret_cast<intptr_t>(val), 16, num_digits);
257 }