这个实参可与一个数字联合使用,以告知格式化程序在小数点前有多少个数位。
This argument can be used with a number, which tells the formatter how many digits to use before the decimal point.
这里可能有更多的小数位,但因为我对结果设定了格式,我们只看到两位。
And there's probably more digits after the decimal place, but because of my formatting string, I only see a couple of them.
再添加一个数字实参就能告诉格式化程序要使用多少个小数位。
Adding a number argument as well will tell the formatter how many decimal digits to use.
And there's probably more digits after the decimal place, but because of my formatting string, I only see a couple of them.
这里可能有更多的小数位,但因为我对结果设定了格式,我们只看到两位。
应用推荐