I like it; would you consider writing a PR? there's a few things I would change in the API but it could be addressed in code review.
also, this case fails:
doAssert fmtFloat(-0.0, 1, "t") == "-0.0"
Run
you can use math.signbit, or better, factor out the 1st part with math.classify
to take care of all edge cases 1st
