add []u64.str()

pull/1427/head^2
unknown-v 2019-08-02 01:06:52 +02:00 committed by Alexander Medvednikov
parent be0796ce14
commit a27165f07e
1 changed files with 12 additions and 0 deletions

View File

@ -220,6 +220,18 @@ pub fn (a []int) str() string {
return res
}
pub fn (a []u64) str() string {
mut res := '['
for i := 0; i < a.len; i++ {
val := a[i]
res += '$val'
if i < a.len - 1 {
res += ', '
}
}
res += ']'
return res
}
//pub fn (a []int) free() {
pub fn (a array) free() {
//if a.is_slice {