mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: x.vstring() instead of string(x) (#6102)
This commit is contained in:
@ -4,9 +4,8 @@ pub fn repeat(c byte, n int) string {
|
||||
if n <= 0 {
|
||||
return ''
|
||||
}
|
||||
mut arr := [c].repeat(n + 1)
|
||||
arr[n] = `\0`
|
||||
return string(arr,n)
|
||||
arr := [c].repeat(n)
|
||||
return arr.bytestr()
|
||||
}
|
||||
|
||||
pub fn repeat_string(s string, n int) string {
|
||||
|
Reference in New Issue
Block a user