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

string: fix trim_right

This commit is contained in:
Alexander Medvednikov
2019-08-17 20:07:40 +03:00
parent d984f2ccec
commit 60bf668281
2 changed files with 18 additions and 10 deletions

View File

@@ -294,6 +294,13 @@ fn test_trim_left() {
assert s.trim_left(' ') == 'module main'
}
fn test_trim_right() {
mut s := 'module main'
assert s.trim_right(' ') == 'module main'
s = 'module main '
assert s.trim_right(' ') == 'module main'
}
fn test_all_after() {
s := 'fn hello'
q := s.all_after('fn ')