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

v orm: select

This commit is contained in:
Alexander Medvednikov
2020-06-17 00:59:33 +02:00
parent 23993d2264
commit ed58192e4c
10 changed files with 304 additions and 44 deletions

View File

@ -8,11 +8,25 @@ fn test_sb() {
assert sb.len == 8
assert sb.str() == 'hi!hello'
assert sb.len == 0
///
sb = strings.new_builder(10)
sb.write('a')
sb.write('b')
assert sb.len == 2
assert sb.str() == 'ab'
///
sb = strings.new_builder(10)
sb.write('123456')
assert sb.cut_last(2) == '56'
assert sb.str() == '1234'
///
/*
sb = strings.new_builder(10)
sb.write('123456')
x := sb.cut_to(2)
assert x == '456'
assert sb.str() == '123'
*/
}
const (