1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: string interpolation field width support for large integers and utf8 strings

This commit is contained in:
Uwe Krüger
2020-05-02 00:43:59 +02:00
committed by GitHub
parent 2f64594ce0
commit 170ee4312f
7 changed files with 290 additions and 138 deletions

View File

@@ -218,7 +218,7 @@ pub fn (b &Benchmark) total_duration() i64 {
// //////////////////////////////////////////////////////////////////
fn (b &Benchmark) tdiff_in_ms(s string, tdiff i64) string {
if b.verbose {
return '${tdiff/1000.0:9.3f} ms $s'
return '${f64(tdiff)/1000.0:9.3f} ms $s'
}
return s
}