20: stdFormatter ( formatter )
21, propertyFormatString( customFormatString )
22, formatString ( customFormatString )
31 integer parsePosCopy= parsePos;
32 if( (parsePos= formatString.IndexOf( ESCCharacter, parsePosCopy ) ) < 0 )
36 integer endPos= parsePos+ 1;
37 if( endPos < formatString.Length() )
40 if( formatString[endPos] == ESCCharacter )
42 formatString.Delete( endPos, 1 );
48 while( endPos < formatString.Length() && isalpha( formatString[endPos] ) )
51 identifier= formatString.Substring<NC>( parsePos + 1, endPos - parsePos - 1 );
55 if( identifier.IsEmpty() )
59 auto entryIt= propertyTable.begin();
60 while( entryIt != propertyTable.end() )
62 if( Substring(identifier).ConsumePartOf<lang::Case::Ignore>( entryIt->Name,
63 entryIt->MinimumRecognitionLength
64 ) == identifier.Length() )
67 formatString.Delete( parsePos, endPos - parsePos + (formatString[endPos] == ESCCharacter ? 1 : 0) );
70 callBacks.emplace_back( &*entryIt );
78 if( entryIt == propertyTable.end() )
80 Exception e( ALIB_CALLER_NULLED, FMTExceptions::UnknownPropertyInFormatString,
81 ESCCharacter, identifier, customFormatString );
82 for( auto& row : propertyTable )
83 e.Back().Add( ESCCharacter, row.Name,
", " );
95 std::vector<String> heapStrings;
100 BoxesMA& results= stdFormatter->GetArgContainer();
101 results.
Add( formatString );
102 for(
auto& entry : callBacks )
104 Box argument= entry->Callback( src, localString );
107 heapStrings.emplace_back( localString );
108 argument= heapStrings.back();
111 results.
Add ( argument );
118 stdFormatter->FormatArgs( target, results );