mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: id []typ
This commit is contained in:

committed by
Alexander Medvednikov

parent
8d13880cab
commit
437b32fe78
@ -188,7 +188,7 @@ pub fn (arr mut array) _push_many(val voidptr, size int) {
|
||||
arr.len += size
|
||||
}
|
||||
|
||||
pub fn (a[]int) str() string {
|
||||
pub fn (a []int) str() string {
|
||||
mut res := '['
|
||||
for i := 0; i < a.len; i++ {
|
||||
val := a[i]
|
||||
@ -201,14 +201,13 @@ pub fn (a[]int) str() string {
|
||||
return res
|
||||
}
|
||||
|
||||
pub fn (a[]int) free() {
|
||||
// println('array free')
|
||||
pub fn (a []int) free() {
|
||||
C.free(a.data)
|
||||
}
|
||||
|
||||
// TODO generic
|
||||
// "[ 'a', 'b', 'c' ]"
|
||||
pub fn (a[]string) str() string {
|
||||
pub fn (a []string) str() string {
|
||||
mut res := '['
|
||||
for i := 0; i < a.len; i++ {
|
||||
val := a[i]
|
||||
|
Reference in New Issue
Block a user