Commit graph

5 commits

Author SHA1 Message Date
asynts 3224fb7d55 AK: Allow calling format without arguments. 2020-09-23 21:45:28 +02:00
asynts 675b482fe7 AK: Add missing overload to format.
I had this in #3580 but I must have lost it during rebasing.
2020-09-22 19:06:06 +02:00
asynts e5497a326a AK: Add StringBuilder::appendff using the new format.
StringBuilder::appendf was already used, thus this name. If we some day
replace all usages of printf, we could rename this method.
2020-09-22 15:06:40 +02:00
asynts 4fcdc19b14 AK: Remove strtoull dependency from format.
This function is not avaliable in the kernel.

In the future it would be nice to have some sort of <charconv> header
that does this for all integer types and then call it in strtoull and et
cetera.

The difference would be that this function say 'from_chars' would return
an Optional and not just interpret anything invalid as zero.
2020-09-22 15:06:40 +02:00
asynts 2bda21318c AK: Add format function like std::format or fmt::format. 2020-09-21 20:17:36 +02:00