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

16 lines
249 B
Go
Raw Normal View History

import strings
fn test_sb() {
mut sb := strings.Builder{}
sb.write('hi')
sb.write('!')
sb.write('hello')
assert sb.str() == 'hi!hello'
sb = strings.new_builder(10)
sb.write('a')
sb.write('b')
println(sb.str())
assert sb.str() == 'ab'
}