17 integer parsePosCopy= parsePos;
18 if( (parsePos= formatString.IndexOf( ESCCharacter, parsePosCopy ) ) < 0 )
22 integer endPos= parsePos+ 1;
23 if( endPos < formatString.Length() ) {
25 if( formatString[endPos] == ESCCharacter ) {
26 formatString.Delete( endPos, 1 );
32 while( endPos < formatString.Length() && isalpha( formatString[endPos] ) )
35 identifier= formatString.Substring<NC>( parsePos + 1, endPos - parsePos - 1 );
39 if( identifier.IsEmpty() )
43 auto entryIt= propertyTable.begin();
44 while( entryIt != propertyTable.end() ) {
45 if( Substring(identifier).ConsumePartOf<lang::Case::Ignore>( entryIt->Name,
46 entryIt->MinimumRecognitionLength
47 ) == identifier.Length() )
50 formatString.Delete( parsePos, endPos - parsePos + (formatString[endPos] == ESCCharacter ? 1 : 0) );
53 callBacks.emplace_back( &*entryIt );
61 if( entryIt == propertyTable.end() ) {
62 Exception e( ALIB_CALLER_NULLED, FMTExceptions::UnknownPropertyInFormatString,
63 ESCCharacter, identifier, customFormatStringx );
64 for( auto& row : propertyTable )
65 e.Back().Add( ESCCharacter, row.Name,
", " );
74 std::vector<String> heapStrings;
82 Box argument= entry->Callback( src, localString );
84 heapStrings.emplace_back( localString );
85 argument= heapStrings.back();
88 results.
Add ( argument );
#define ALIB_CALLER_NULLED
Exception & Add(const lang::CallerInfo &ci, TEnum type, TArgs &&... args)
void DbgDisableBufferReplacementWarning()
constexpr bool IsNotEmpty() const
containers::SharedPtr< format::Formatter > SPFormatter
strings::util::StringEscaperStandard StringEscaperStandard
Type alias in namespace #"%alib".
strings::TEscape< character > Escape
Type alias in namespace #"%alib".
constexpr const String EMPTY_STRING
An empty string of the default character type.
lang::integer integer
Type alias in namespace #"%alib".
boxing::Box Box
Type alias in namespace #"%alib".
strings::TString< character > String
Type alias in namespace #"%alib".
exceptions::Exception Exception
Type alias in namespace #"%alib".
LocalString< 128 > String128
Type alias name for #"TLocalString;TLocalString<character,128>".
boxing::TBoxes< MonoAllocator > BoxesMA
Type alias in namespace #"%alib".
strings::TAString< character, lang::HeapAllocator > AString
Type alias in namespace #"%alib".
characters::character character
Type alias in namespace #"%alib".