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

builtin: document last of array.v (#8575)

This commit is contained in:
Larpon 2021-02-05 16:51:45 +01:00 committed by GitHub
parent 22e23eda5d
commit 44ab0154b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,7 +135,7 @@ pub fn (a array) repeat(count int) array {
return arr
}
// sort sorts array in-place using given `compare` function as comparator.
// sort_with_compare sorts array in-place using given `compare` function as comparator.
pub fn (mut a array) sort_with_compare(compare voidptr) {
C.qsort(mut a.data, a.len, a.element_size, compare)
}
@ -418,7 +418,8 @@ fn (mut a array) push(val voidptr) {
a.len++
}
// `val` is array.data
// push_many implements the functionality for pushing another array.
// `val` is array.data and user facing usage is `a << [1,2,3]`
// TODO make private, right now it's used by strings.Builder
pub fn (mut a3 array) push_many(val voidptr, size int) {
if a3.data == val && !isnil(a3.data) {