mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
string: add repeat() method
This commit is contained in:
parent
9834ccfcd9
commit
fb4f14ba76
2 changed files with 19 additions and 0 deletions
|
@ -459,3 +459,8 @@ fn test_ustring_count() {
|
|||
assert (a.count('ﷰ'.ustring())) == 2
|
||||
assert (a.count('a'.ustring())) == 0
|
||||
}
|
||||
|
||||
fn test_repeat() {
|
||||
s := 'V! '
|
||||
assert s.repeat(5) == 'V! V! V! V! V! '
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue