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

fix strings.Builder.str()

This commit is contained in:
Alexander Medvednikov
2019-11-17 02:22:43 +03:00
parent be7cf3e812
commit 6ae8457f35
4 changed files with 7 additions and 8 deletions

View File

@ -36,7 +36,8 @@ pub fn (b mut Builder) writeln(s string) {
b.len += s.len + 1
}
pub fn (b Builder) str() string {
pub fn (b mut Builder) str() string {
b.buf << `\0`
return string(b.buf, b.len)
}