blob: 2681b949f00d9d02cddb48bec2e80a182eebf538 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
module strings
pub fn repeat(c byte, n int) string {
if n <= 0 {
return ''
}
arr := [c].repeat(n)
return arr.bytestr()
}
pub fn repeat_string(s string, n int) string {
/*
// TODO: uncomment this. It is commented for now, so that `v doc strings` works
res := # s.repeat(n)
return res
*/
}
|