rapidyaml  0.13.0
parse and emit YAML, and do it fast
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

◆ zpad() [1/5]

template<class T >
integral_padded_<T> c4::fmt::zpad ( 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.

233 {
234  return integral_padded_<T>(val, T(10), num_digits);
235 }

◆ zpad() [2/5]

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 }

◆ zpad() [3/5]

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 }

◆ zpad() [4/5]

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 }

◆ zpad() [5/5]

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 }