kblib 0.2.3
General utilities library for modern C++
format.h File Reference

Contains some utilities for manipulating and querying string representations. More...

#include "fakestd.h"
#include <algorithm>
#include <cmath>
Include dependency graph for format.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  kblib
 The main namespace in which all entities from kblib are defined.
 

Functions

template<typename Number >
constexpr auto kblib::count_digits (Number val) -> enable_if_t< std::is_floating_point< Number >::value, int >
 Calculates the number of decimal digits needed to represent a number, plus one for negative numbers. More...
 
template<typename Number >
constexpr auto kblib::count_digits (Number val, int base) -> int
 Calculates the number of digits needed to represent a number in a given base, plus one for negative numbers. More...
 
template<typename ForwardIt >
auto kblib::max_count_digits (ForwardIt first, ForwardIt last) -> int
 Returns the necessary number of digits to represent the largest value in an input range. More...
 
template<typename ForwardIt >
auto kblib::max_count_digits (ForwardIt first, ForwardIt last, int base) -> int
 Returns the necessary number of digits to represent the largest value in an input range. More...
 

Detailed Description

Contains some utilities for manipulating and querying string representations.

Author
killerbee
Date
2019-2021

Definition in file format.h.