mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: byte => u8
This commit is contained in:
@@ -80,7 +80,7 @@ Single format functions
|
||||
*/
|
||||
pub struct BF_param {
|
||||
pub mut:
|
||||
pad_ch byte = byte(` `) // padding char
|
||||
pad_ch byte = u8(` `) // padding char
|
||||
len0 int = -1 // default len for whole the number or string
|
||||
len1 int = 6 // number of decimal digits, if needed
|
||||
positive bool = true // mandatory: the sign of the number passed
|
||||
@@ -104,13 +104,13 @@ pub fn format_str(s string, p BF_param) string {
|
||||
}
|
||||
if p.allign == .right {
|
||||
for i1 := 0; i1 < dif; i1++ {
|
||||
res.write_byte(p.pad_ch)
|
||||
res.write_u8(p.pad_ch)
|
||||
}
|
||||
}
|
||||
res.write_string(s)
|
||||
if p.allign == .left {
|
||||
for i1 := 0; i1 < dif; i1++ {
|
||||
res.write_byte(p.pad_ch)
|
||||
res.write_u8(p.pad_ch)
|
||||
}
|
||||
}
|
||||
return res.str()
|
||||
|
||||
Reference in New Issue
Block a user