all: add strings.Builder.write_string and use write_string instead of write (#8892)

This commit is contained in:
zakuro 2021-02-22 20:18:11 +09:00 committed by GitHub
parent 36a6bc270c
commit f54c1a5cc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 402 additions and 397 deletions

View file

@ -23,7 +23,7 @@ pub fn (mut b Builder) write_b(data byte) {
b.len++
}
pub fn (mut b Builder) write(s string) {
pub fn (mut b Builder) write_string(s string) {
b.buf.push_many(s.str, s.len)
// b.buf << []byte(s) // TODO
b.len += s.len