mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: add strings.Builder.write_string and use write_string instead of write (#8892)
This commit is contained in:
@ -37,9 +37,14 @@ pub fn (mut b Builder) write_b(data byte) {
|
||||
b.len++
|
||||
}
|
||||
|
||||
[deprecated: 'write(string) will be changed to write([]byte)']
|
||||
pub fn (mut b Builder) write(s string) {
|
||||
b.write_string(s)
|
||||
}
|
||||
|
||||
// write appends the string `s` to the buffer
|
||||
[inline]
|
||||
pub fn (mut b Builder) write(s string) {
|
||||
pub fn (mut b Builder) write_string(s string) {
|
||||
if s == '' {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user