#include <typeinfo>
#include <iomanip>
#include <variant>
#include <iostream>
#include <boost/lexical_cast.hpp>
#include <boost/exception/diagnostic_information.hpp>
#include <ifw/core/utils/base/base.hpp>
#include <ifw/core/utils/string/string.hpp>
Go to the source code of this file.
|
std::string | ifw::core::utils::conversion::DblToString (const double dbl_val, const std::string &prec_or_format="3") |
| Convert a double value to its string representation, applying the given precision.
|
|
std::string | ifw::core::utils::conversion::BoolToString (const bool bool_val, const bool long_format=true) |
| Convert a boolean value to a string (Short format: T/F; Long format: True/False).
|
|
bool | ifw::core::utils::conversion::Boolean (const std::string &value, const bool permissive=false) |
| Interpret a string as a boolean (t/T/true/TRUE -> true; f/F/false/FALSE -> false).
|
|
template<typename TYPE > |
std::string | ifw::core::utils::conversion::NbToStr (const TYPE number, const std::string &format="") |
| Convert the given value to a string representation.
|
|
void | ifw::core::utils::conversion::Convert (const std::string &str_value, std::string &native_value) |
| Handle case: Conversion of std::string to std::string.
|
|
template<typename TYPE > |
void | ifw::core::utils::conversion::Convert_ (const std::string &str_value, std::variant< TYPE > &native_value) |
| Convert a value represented as string into its 'native type'. Data type not given. Boolean string representations are converted as: {t/T/true/True/TRUE -> true} and {f/F/false/False/FALSE -> false}.
|
|
template<typename TYPE > |
void | ifw::core::utils::conversion::Convert (const std::string &str_value, TYPE &value) |
| Convert a value represented as string into its 'native type'. Data type not given.
|
|