Standard LibraryTypesSetMethodsclearOn this pageclear Method of Set. clear() -> void Clears all elements from the container.