Initial project import
This commit is contained in:
commit
23f2d29e32
11957 files changed
+1754577
No files matched your search
@@ -0,0 +1,29 @@
|
||||
module builtin
|
||||
|
||||
import strings
|
||||
|
||||
pub fn (ra []rune) string() string {
|
||||
mut sb := strings.new_builder(ra.len)
|
||||
sb.write_runes(ra)
|
||||
res := sb.str()
|
||||
return res
|
||||
}
|
||||
|
||||
pub fn (c rune) repeat(count int) string {
|
||||
if count <= 0 {
|
||||
return ''
|
||||
} else if count == 1 {
|
||||
return c.str()
|
||||
}
|
||||
res := ''
|
||||
#res.str = String.fromCharCode(Number(c.val))
|
||||
|
||||
return res.repeat(count)
|
||||
}
|
||||
|
||||
pub fn (c rune) str() string {
|
||||
res := ''
|
||||
#res.str = String.fromCharCode(Number(c.val))
|
||||
|
||||
return res
|
||||
}
|
||||
Reference in new issue
Block a user