Initial project import
This commit is contained in:
commit
23f2d29e32
11957 files changed
+1754577
No files matched your search
@@ -0,0 +1,16 @@
|
||||
module strings
|
||||
|
||||
pub fn repeat(c u8, n int) string {
|
||||
if n <= 0 {
|
||||
return ''
|
||||
}
|
||||
arr := [c].repeat(n)
|
||||
return arr.bytestr()
|
||||
}
|
||||
|
||||
pub fn repeat_string(s string, n int) string {
|
||||
res := ''
|
||||
#res.str = s.str.repeat(n.valueOf())
|
||||
|
||||
return res
|
||||
}
|
||||
Reference in new issue
Block a user