SatDump 2.0.0-alpha-76a915210
Loading...
Searching...
No Matches
format.h File Reference

String formatting utils. More...

#include <sstream>
#include <vector>

Go to the source code of this file.

Functions

template<typename T>
std::string satdump::to_string_with_precision (const T a_value, const int n=6)
 Format a number to string with a specific float precision.
template<typename... T>
std::string satdump::svformat (const char *fmt, T &&...args)
 Format a std::string with a standard printf formatting pattern.

Detailed Description

String formatting utils.

Function Documentation

◆ svformat()

template<typename... T>
std::string satdump::svformat ( const char * fmt,
T &&... args )

Format a std::string with a standard printf formatting pattern.

Parameters
fmtformatting string
argsarguments
Returns
formatted string

◆ to_string_with_precision()

template<typename T>
std::string satdump::to_string_with_precision ( const T a_value,
const int n = 6 )

Format a number to string with a specific float precision.

Parameters
a_valuethe number to format
nprecision to use
Returns
formatted string