1
0
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:
Delyan Angelov
2020-08-10 19:05:26 +03:00
committed by GitHub
parent eba413853f
commit 36eae1c175
30 changed files with 143 additions and 72 deletions

View File

@ -38,7 +38,7 @@ pub fn (mut b Builder) writeln(s string) {
}
pub fn (b Builder) str() string {
return string(b.buf, b.len)
return unsafe { byteptr(b.buf.data).vstring_with_len(b.len) }
}
pub fn (mut b Builder) cut(n int) {