Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
Format.h File Reference

String formatting. More...

#include <sese/Config.h>
#include <sese/text/StringBuilder.h>
#include <sese/text/Number.h>
#include <sese/text/FormatOption.h>
#include <sese/types/is_iterable.h>
#include <sese/types/is_pair.h>
#include <sese/Util.h>
#include <cassert>
#include <cmath>

Go to the source code of this file.

Classes

struct  sese::text::FmtCtx
 
struct  sese::text::overload::Formatter< VALUE, ENABLE >
 
struct  sese::text::overload::Formatter< std::string >
 
struct  sese::text::overload::Formatter< const char * >
 
struct  sese::text::overload::Formatter< VALUE, std::enable_if_t< std::is_integral_v< VALUE > > >
 
struct  sese::text::overload::Formatter< VALUE, std::enable_if_t< std::is_floating_point_v< VALUE > > >
 
struct  sese::text::overload::Formatter< VALUE, std::enable_if_t< is_iterable_v< VALUE > > >
 

Namespaces

namespace  sese
 
namespace  sese::text
 
namespace  sese::text::overload
 

Functions

bool sese::text::FormatOption_StringParse (FormatOption &opt, const std::string &opt_str)
 
void sese::text::FormatOption_StringFormat (FmtCtx &ctx, FormatOption &opt, const std::string &value)
 
bool sese::text::FormatOption_NumberParse (FormatOption &opt, const std::string &opt_str)
 
template<typename T >
SESE_ALWAYS_INLINE void sese::text::FormatOption_NumberFormatAlgin (FmtCtx &ctx, FormatOption &opt, T number, int radix, bool upper_case)
 
template<typename T >
void sese::text::FormatOption_NumberFormat (FmtCtx &ctx, FormatOption &opt, T number)
 
template<typename T >
void sese::text::FormatOption_FloatNumberFormat (FmtCtx &ctx, FormatOption &opt, T number)
 
template<typename C , std::enable_if_t<!is_pair< typename C::value_type >::value, int > = 0>
std::string sese::text::for_each (const C &container)
 
constexpr size_t sese::text::FormatParameterCounter (const char *pattern)
 
template<typename T >
void sese::text::Format (FmtCtx &ctx, T &&arg)
 
template<typename T , typename... ARGS>
void sese::text::Format (FmtCtx &ctx, T &&arg, ARGS &&...args)
 
template<typename... ARGS, std::enable_if_t< sizeof...(ARGS)==0, int > = 0>
std::string sese::text::fmt (std::string_view pattern, ARGS &&...)
 
template<typename... ARGS, std::enable_if_t< sizeof...(ARGS) !=0, int > = 0>
std::string sese::text::fmt (std::string_view pattern, ARGS &&...args)
 

Detailed Description

String formatting.

Author
kaoru
Date
June 29, 2024