Skip to content

Set

Set for storage a set of unique collection of items.

Usage

nvs

Same behavior as [Array], we can init a set with a different type.

nvs

Methods

insert

Insert an item into the set.

  • If the set did not previously contain this value, true is returned.
  • If the set already contained this value, false is returned.
nvs

remove

Remove an item from the set, return true if the item was removed, otherwise false.

nvs

contains

Check if the set contains an item.

nvs

len

Return the number of items in the set.

nvs

clear

Remove all items from the set.

nvs

iter

Return a [Iterator] for the set.

nvs

to_array

Convert the set to an array.

nvs