-
Couldn't load subscription status.
- Fork 8
Description
If I want to create a string from a custom format, it seems like I am supposed to use cfmt or format, but these do not have complete flexibility.
For example, if I want to create a string for (3.14)), how would I do that? printfmtln will display it: printfmtln("({:0.2f})", π), but this returns nothing (so it cannot be used later in the program). I tried cfmt but cfmt("(%0.2f)", π) causes an error. It is possible through format by running format(-π; parens=true) but this is not always work if I want something else besides parentheses.
With Printf, this is possible: Printf.format(Printf.Format("(%0.2f)"), π) will return a string. So can cfmt be extended to accept similar options?