summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2020-09-25 13:11:29 +0200
committerAndreas Kling <kling@serenityos.org>2020-09-26 00:00:50 +0200
commit203008474602d920c57b3eedc681ffd0a216f3a7 (patch)
tree59b93f812b6708cee5be0931f046db52d3c22268 /Ports
parent84d276dba0d1d6806eace01a4a0cf08aca76be97 (diff)
downloadserenity-203008474602d920c57b3eedc681ffd0a216f3a7.zip
AK: Borrow exact format syntax form std::format.
Instead of just implementing format specifiers ad-hog this commit implements the exact syntax std::format uses. There are still a ton of features that are not supported by this implementation, however, the format specifiers should be parsed correctly. In some cases however, the format specifiers aren't quite parsed correctly, for example: String::formatted("{:{}}", 42, 4) should produce the string " 42" however an (unrelated) assertion fails. This is because vformat doesn't consider nested parentheses. I have to spend some time coming up with a simple way of doing this, I don't feel like doing that right now. The fundamental code for this already exists, by limiting the number of format arguments (arbitrarily) to 256 large widths are used to encode that these should be taken from other format parameters.
Diffstat (limited to 'Ports')
0 files changed, 0 insertions, 0 deletions