1 Matching Annotations
  1. Dec 2022
    1. The length of a slice is the number of elements it contains. ↳ The capacity of a slice is the number of elements in the underlying array, counting from the first element in the slice. ↳ The length and capacity of a slice s can be obtained using the expressions len(s) and cap(s).

      len(slice []type) cap(slice []type)