mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: run vfmt over string.v
This commit is contained in:
parent
1ef718c1e1
commit
f04dd21e79
@ -1647,13 +1647,13 @@ pub fn (a []string) join(del string) string {
|
|||||||
for i, val in a {
|
for i, val in a {
|
||||||
unsafe {
|
unsafe {
|
||||||
C.memcpy(res.str + idx, val.str, val.len)
|
C.memcpy(res.str + idx, val.str, val.len)
|
||||||
idx+=val.len
|
idx += val.len
|
||||||
}
|
}
|
||||||
// Add del if it's not last
|
// Add del if it's not last
|
||||||
if i != a.len-1 {
|
if i != a.len - 1 {
|
||||||
unsafe {
|
unsafe {
|
||||||
C.memcpy(res.str + idx, del.str, del.len)
|
C.memcpy(res.str + idx, del.str, del.len)
|
||||||
idx+=del.len
|
idx += del.len
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user