mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
require ++ instead of += 1
This commit is contained in:
@@ -19,14 +19,14 @@ pub fn new_builder(initial_size int) Builder {
|
||||
|
||||
pub fn (b mut Builder) write_b(data byte) {
|
||||
b.buf << data
|
||||
b.len += 1
|
||||
b.len++
|
||||
}
|
||||
|
||||
pub fn (b mut Builder) write(s string) {
|
||||
b.buf.push_many(s.str, s.len)
|
||||
//for c in s {
|
||||
//b.buf << c
|
||||
//}
|
||||
//}
|
||||
//b.buf << []byte(s) // TODO
|
||||
b.len += s.len
|
||||
}
|
||||
@@ -34,7 +34,7 @@ pub fn (b mut Builder) write(s string) {
|
||||
pub fn (b mut Builder) writeln(s string) {
|
||||
//for c in s {
|
||||
//b.buf << c
|
||||
//}
|
||||
//}
|
||||
b.buf.push_many(s.str, s.len)
|
||||
//b.buf << []byte(s) // TODO
|
||||
b.buf << `\n`
|
||||
|
||||
Reference in New Issue
Block a user