rapidyaml 0.14.0
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
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
template<class T>
integral_padded_< T > c4::fmt::zpad (integral_< T > val, size_t num_digits)
 pad the argument with zeroes on the left
integral_padded_< intptr_t > c4::fmt::zpad (std::nullptr_t, size_t num_digits)
 pad the argument with zeroes on the left
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
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 ( 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.

233{
234 return integral_padded_<T>(val, T(10), num_digits);
235}
format an integral type with a custom radix, and pad with zeroes on the left
Definition format.hpp:117

◆ 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}