1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

add []u64.str()

This commit is contained in:
unknown-v 2019-08-02 01:06:52 +02:00 committed by Alexander Medvednikov
parent be0796ce14
commit a27165f07e

View File

@ -220,6 +220,18 @@ pub fn (a []int) str() string {
return res 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 []int) free() {
pub fn (a array) free() { pub fn (a array) free() {
//if a.is_slice { //if a.is_slice {