8#ifndef HPP_ALIB_STRINGS_FORMAT
9#define HPP_ALIB_STRINGS_FORMAT 1
12#if !defined(HPP_ALIB_STRINGS_TASTRING_INLINING)
13# error "ALib sources with ending '.inl' must not be included from outside."
22namespace alib {
namespace strings {
82template<
typename TChar>
165 #if ALIB_BOXING || DOXYGEN
199 TChar fillChar =
' ' )
284 template<
typename TIntegral>
286 int overrideWidth= 0,
290 ,
nf (numberFormat) {}
299 template<
typename TIntegral>
304 ,
nf (numberFormat) {}
339 template<
typename TIntegral>
341 int overrideWidth= 0,
345 ,
nf (numberFormat) {}
353 template<
typename TIntegral>
358 ,
nf (numberFormat) {}
392 template<
typename TIntegral>
394 int overrideWidth= 0,
398 ,
nf (numberFormat) {}
407 template<
typename TIntegral>
412 ,
nf (numberFormat) {}
428 Fill( TChar pFillChar,
int pCount )
471 int overrideWidth= 0,
488 template<
typename TInteger, ATMP_T_IF(
int, std::numeric_limits<TInteger>::is_
integer) = 0 >
490 int overrideWidth= 0,
493 ,
width (overrideWidth)
494 ,
valueType( std::numeric_limits<TInteger>::is_signed ? 1 : 2 )
495 {
v.value=
static_cast<int64_t
>(
value); }
497 template<
typename TInteger, ATMP_T_IF(
int, std::numeric_limits<TInteger>::is_
integer) = 0 >
502 ,
valueType( std::numeric_limits<TInteger>::is_signed ? 1 : 2 )
503 {
v.value=
static_cast<int64_t
>(
value); }
506 ||
ATMP_EQ(TFloat,
float ) )= 0 >
508 int overrideWidth= 0,
509 TNumberFormat<TChar>* numberFormat =
nullptr )
511 ,
width (overrideWidth)
513 {
v.fpValue=
static_cast<double>(
value); }
516 ||
ATMP_EQ(TFloat,
float ) )= 0 >
518 TNumberFormat<TChar>* numberFormat =
nullptr )
522 {
v.fpValue=
static_cast<double>(
value); }
537 namespace APPENDABLES {
541template<
typename TChar,
typename TAllocator>
struct T_Append<
TFormat<TChar> ,TChar,TAllocator>
553template<
typename TChar,
typename TAllocator>
struct T_Append<typename
TFormat<TChar>::Tab ,TChar,TAllocator>
565template<
typename TChar,
typename TAllocator>
struct T_Append<typename
TFormat<TChar>::Field ,TChar,TAllocator>
578template<
typename TChar,
typename TAllocator>
struct T_Append<typename
TFormat<TChar>::Escape ,TChar,TAllocator>
593template<
typename TChar,
typename TAllocator>
struct T_Append<typename
TFormat<TChar>::Bin ,TChar,TAllocator>
605template<
typename TChar,
typename TAllocator>
struct T_Append<typename
TFormat<TChar>::Hex ,TChar,TAllocator>
617template<
typename TChar,
typename TAllocator>
struct T_Append<typename
TFormat<TChar>::Oct ,TChar,TAllocator>
629template<
typename TChar,
typename TAllocator>
struct T_Append<typename
TFormat<TChar>::Fill ,TChar,TAllocator>
#define ATMP_EQ( T, TEqual)
#define ATMP_T_IF(T, Cond)
Switch
Denotes if sth. is switched on or off.
@ On
Switch it on, switched on, etc.
Alignment
Denotes Alignments.
@ Right
Chooses right alignment.
static constexpr integer MAX_LEN
The maximum length of an ALib string.
constexpr const String EMPTY_STRING
An empty string of the default character type.
lang::integer integer
Type alias in namespace alib.