mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
builtin: cleanup string trim()/trim_left()/trim_right() (#22225)
This commit is contained in:
parent
9b88dc8deb
commit
ca5f47a966
2 changed files with 48 additions and 54 deletions
|
@ -943,6 +943,7 @@ fn test_trim_left() {
|
|||
s = 'banana'
|
||||
assert s.trim_left('ba') == 'nana'
|
||||
assert s.trim_left('ban') == ''
|
||||
assert 'あいうえお'.trim_left('あい') == 'うえお'
|
||||
}
|
||||
|
||||
fn test_trim_right() {
|
||||
|
@ -954,6 +955,7 @@ fn test_trim_right() {
|
|||
s = 'banana'
|
||||
assert s.trim_right('na') == 'b'
|
||||
assert s.trim_right('ban') == ''
|
||||
assert 'あいうえお'.trim_right('うえお') == 'あい'
|
||||
}
|
||||
|
||||
fn test_all_before() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue