From a27165f07e90a06a246e64b00542cfb0e5dd7a9c Mon Sep 17 00:00:00 2001 From: unknown-v <52547845+unknown-v@users.noreply.github.com> Date: Fri, 2 Aug 2019 01:06:52 +0200 Subject: [PATCH] add []u64.str() --- vlib/builtin/array.v | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vlib/builtin/array.v b/vlib/builtin/array.v index ea4278fe0c..ae2be37abc 100644 --- a/vlib/builtin/array.v +++ b/vlib/builtin/array.v @@ -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 {