Standard LibraryTypesSetMethodscapacityOn this pagecapacity Method of Set. capacity() -> integer Returns the number of elements that the container has currently allocated space for.