Mention toSet in the docs of the set type (#21037)
This commit is contained in:
parent
696def2bf7
commit
e669835665
1 changed files with 8 additions and 0 deletions
|
|
@ -38,6 +38,14 @@ can also be used to include elements (and ranges of elements):
|
|||
# from '0' to '9'
|
||||
```
|
||||
|
||||
The module [`std/setutils`](https://nim-lang.org/docs/setutils.html) provides a way to initialize a set from an iterable:
|
||||
|
||||
```nim
|
||||
import std/setutils
|
||||
|
||||
let uniqueChars = myString.toSet
|
||||
```
|
||||
|
||||
These operations are supported by sets:
|
||||
|
||||
================== ========================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue