51 placeholder.NF.Flags -= NumberFormatFlags::ForceDecimalPoint;
52 placeholder.NF.Flags -= NumberFormatFlags::OmitTrailingFractionalZeros;
63 while( (idx=
parser.IndexOf(
'%', idx )) >= 0
64 && (
parser.CharAt( idx + 1 ) ==
'%'
65 ||
parser.CharAt( idx + 1 ) ==
'n' ) )
79 auto* src =
parser.Buffer();
81 parser.ConsumeChars( length );
89 if( ( c1 ==
'%' && c2 ==
'%')
94 case 'r': c1=
'\r' ;
break;
95 case 'n': c1=
'\n' ;
break;
96 case 't': c1=
'\t' ;
break;
97 case 'a': c1=
'\a' ;
break;
98 case 'b': c1=
'\b' ;
break;
99 case 'v': c1=
'\v' ;
break;
100 case 'f': c1=
'\f' ;
break;
101 case '"': c1=
'"' ;
break;
102 case '\\': c1=
'\\' ;
break;
103 default: c1=
'?' ;
break;
109 else if( c1 ==
'%' && c2 ==
'n' ) {
139 states state= POSITION;
140 #define NEXTSTATE(s) { state= s; continue; }
149 if (
parser.ConsumeChar(
'<') ) {
153 while( i <
parser.Length()
154 && isdigit(
parser.CharAt<
NC>(i) ) )
157 if( i > 0 &&
parser.CharAt<
NC>(i) ==
'$') {
159 parser.ConsumeChar(
'$') ,
true )
169 bool flagsDone=
false;
171 switch (
parser.CharAtStart() ) {
186 placeholder.NF.Flags += NumberFormatFlags::ForceDecimalPoint;
187 placeholder.NF.Flags -= NumberFormatFlags::OmitTrailingFractionalZeros;
201 placeholder.NF.Flags += NumberFormatFlags::WriteGroupChars;
222 if( isdigit(
parser.CharAtStart() ) )
244 if ( typeCharLower ==
'a' ) {
264 if(
NCString(
"egf").IndexOf(
static_cast<nchar>(typeCharLower) ) < 0 )
276 switch ( typeCharLower ) {
287 placeholder.NF.Flags+= NumberFormatFlags::ForceScientific;
break;
343 NEXTSTATE(TYPE_SUFFIX)
355 default:
ALIB_ERROR(
"FORMAT",
"Illegal switch state." )
break;
364 if( startIdx >= 0 &&
placeholderJS.ConversionUpper && target ==
nullptr )
#define ALIB_ASSERT_RESULT_EQUALS( func, value)
#define ALIB_CALLER_NULLED
#define ALIB_ERROR(domain,...)
void InsertDerived(TArgs &&... args)
@ Center
Chooses centered alignment.
@ Right
Chooses right alignment.
@ Left
Chooses left alignment.
containers::SharedPtr< format::Formatter > SPFormatter
strings::TCString< nchar > NCString
Type alias in namespace #"%alib".
lang::integer integer
Type alias in namespace #"%alib".
strings::TString< character > String
Type alias in namespace #"%alib".
characters::nchar nchar
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".