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

strings: rename Builder.write_b() to Builder.write_byte(), add deprecation (#13313)

This commit is contained in:
Benjamin Stigsen
2022-01-28 19:34:44 +01:00
committed by GitHub
parent 7f22ed7935
commit ceb05b163a
23 changed files with 100 additions and 88 deletions

View File

@@ -18,10 +18,15 @@ pub fn new_builder(initial_size int) Builder {
return []byte{cap: initial_size}
}
[deprecated: 'Use write_byte() instead']
pub fn (mut b Builder) write_b(data byte) {
b << data
}
pub fn (mut b Builder) write_byte(data byte) {
b << data
}
pub fn (mut b Builder) write(data []byte) ?int {
if data.len == 0 {
return 0