[libc++][format] Fixes floating-point formatting.
Formatting the alternate form for the general categories should keep the trailing zeros. This was reported by @fsb4000 in D131336. The default format uses general formatting but this should not keep the trailing zeros so the default format is not passed to the formatter. While testing I found an off by one error; finding the exponent character `e` in 1e+03 will start at after the `1` so a size of `4` can contain an exponent. Reviewed By: fsb4000, ldionne, #libc Differential Revision: https://reviews.llvm.org/D131417
Loading
Please sign in to comment