37 placeholder.NF.Flags -= NumberFormatFlags::ForceDecimalPoint;
41 placeholder.NF.Flags += NumberFormatFlags::OmitTrailingFractionalZeros;
51 while( (idx=
parser.IndexOf(
'{', idx )) >= 0
52 &&
parser.CharAt( idx + 1 ) ==
'{' )
63 if( isdigit(
parser.CharAtStart() ) ) {
65 parser.ConsumeDecDigits( argNo );
70 if(
parser.CharAtStart() ==
'!' ) {
74 if( endConversion < 0 )
82 if(
parser.CharAtStart() ==
':' ) {
113 if(
parser.CharAtStart() !=
'}' )
133 do switch ( formatSpec.
CharAt( cNo++ ) ) {
151 while( cNo < 2 && charsToConsume != 1 );
156 while( (actChar= formatSpec.
CharAtStart()) !=
'\0' ) {
158 if( isdigit( actChar ) ) {
163 if ( actChar ==
'0' )
177 else if( actChar ==
'.' ) {
180 - formatSpec.
Length() -1 );
187 - formatSpec.
Length() - 1 );
193 else if (
String(
A_CHAR(
"sdcboxXeEfFngGhHB%" )).IndexOf( actChar ) >= 0 ) {
201 ,
A_CHAR(
"\nDbgInfo: Native argument type: <{}>")
209 - formatSpec.
Length() - 1 );
234 placeholder.NF.Flags+= NumberFormatFlags::ForceScientific;
break;
238 case 'F':
placeholder.NF.Flags-= NumberFormatFlags::OmitTrailingFractionalZeros;
249 default:
ALIB_ERROR(
"FORMAT",
"Unhandled character in choices string above" )
257 else switch( actChar ) {
265 placeholder.NF.Flags+= NumberFormatFlags::ForceDecimalPoint;
266 placeholder.NF.Flags-= NumberFormatFlags::OmitTrailingFractionalZeros;
270 case ',':
placeholder.NF.Flags+= NumberFormatFlags::WriteGroupChars;
282 ,
A_CHAR(
"\nDbgInfo: Native argument type: <{}>")
300 auto* src =
parser.Buffer();
302 parser.ConsumeChars( length );
306 while( length > 1 ) {
313 else if( ( c1 ==
'{' && c2 ==
'{')
314 || ( c1 ==
'}' && c2 ==
'}')
319 case 'r': c1=
'\r' ;
break;
325 case 't': c1=
'\t' ;
break;
326 case 'a': c1=
'\a' ;
break;
327 case 'b': c1=
'\b' ;
break;
328 case 'v': c1=
'\v' ;
break;
329 case 'f': c1=
'\f' ;
break;
330 case '"': c1=
'"' ;
break;
331 case '\\': c1=
'\\' ;
break;
332 default: c1=
'?' ;
break;
356 bool isPreProcess= startIdx < 0;
357 bool isPostProcess= startIdx>= 0 && target ==
nullptr;
368 ,
A_CHAR(
"\nDbgInfo: Native argument type: <{}>")
389 targetString->InsertAt<
NC>( open, startIdx ) .Append<NC>( close );
443 else if ( isPostProcess )
468 ,
A_CHAR(
"\nDbgInfo: Native argument type: <{}>")
473 if( target !=
nullptr ) {
490 ,
A_CHAR(
"\nDbgInfo: Native argument type: <{}>")
524 ,
A_CHAR(
"\nDbgInfo: Native argument type: <{}>")
#define ALIB_CALLER_NULLED
#define ALIB_ERROR(domain,...)
void InsertDerived(TArgs &&... args)
integer SearchAndReplace(TChar needle, TChar replacement, integer startIdx=0, integer endIdx=strings::MAX_LEN)
constexpr integer Length() const
constexpr bool IsEmpty() const
TChar CharAtStart() const
TChar CharAt(integer idx) const
constexpr bool IsNotEmpty() const
constexpr bool IsNull() const
TString< TChar > ConsumeField(TChar startChar, TChar endChar)
integer ConsumePartOf(const TString< TChar > &consumable, int minChars=1)
bool ConsumeDecDigits(std::integral auto &result)
integer ConsumeChars(integer regionLength, TSubstring *target=nullptr)
@ Field
denotes a field width entry.
@ Tabstop
denotes a tab stop entry.
@ Center
Chooses centered alignment.
@ Right
Chooses right alignment.
@ Left
Chooses left alignment.
Switch
Denotes if sth. is switched on or off.
@ On
Switch it on, switched on, etc.
@ Off
Switch it off, switched off, etc.
@ Include
Chooses inclusion.
containers::SharedPtr< format::Formatter > SPFormatter
LocalString< 8 > String8
Type alias name for #"TLocalString;TLocalString<character,8>".
lang::integer integer
Type alias in namespace #"%alib".
strings::TString< character > String
Type alias in namespace #"%alib".
strings::TSubstring< character > Substring
Type alias in namespace #"%alib".
exceptions::Exception Exception
Type alias in namespace #"%alib".
strings::TAString< character, lang::HeapAllocator > AString
Type alias in namespace #"%alib".
characters::character character
Type alias in namespace #"%alib".