v / vlib / strings
Raw file | 16 loc (13 sloc) | 238 bytes | Latest commit hash fbb9e65c0
1module strings
2
3pub fn repeat(c u8, n int) string {
4 if n <= 0 {
5 return ''
6 }
7 arr := [c].repeat(n)
8 return arr.bytestr()
9}
10
11pub fn repeat_string(s string, n int) string {
12 res := ''
13 #res.str = s.str.repeat(n.valueOf())
14
15 return res
16}