rapidyaml  0.11.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 236 of file format.hpp.

237 {
238  return integral_padded_<T>(val, T(10), num_digits);
239 }

◆ 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 242 of file format.hpp.

243 {
244  return integral_padded_<T>(val.val, val.radix, num_digits);
245 }

References c4::fmt::integral_< T >::radix, and c4::fmt::integral_< T >::val.

◆ 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 247 of file format.hpp.

248 {
249  return integral_padded_<intptr_t>(0, 16, num_digits);
250 }

◆ 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 253 of file format.hpp.

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

◆ zpad() [5/5]

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

Definition at line 258 of file format.hpp.

259 {
260  return integral_padded_<intptr_t>(reinterpret_cast<intptr_t>(val), 16, num_digits);
261 }