JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in

array/ensure

core-api


    cfunction
    src/core/array.c on line 221, column 1

    (array/ensure arr capacity growth)

    Ensures that the memory backing the array `arr` is large enough for 
    `capacity` items at the given rate `growth`. `capacity` and 
    `growth` must be integers. If the backing capacity is already 
    enough, then there is no change. Otherwise, the backing memory will 
    be reallocated so that there is enough space. Returns `arr`.


0 examplesSign in to add an example
Loading...