diff options
author | Xavier Noria <fxn@hashref.com> | 2022-12-08 10:58:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-08 10:58:00 +0100 |
commit | e669835665bd3b9ab600d1ce3502f4b643606175 (patch) | |
tree | 2fae10915663155f853f2c4a9ff98df4eb83dd05 /doc | |
parent | 696def2bf7000902789f27ff89b37ee2841dd3fd (diff) | |
download | Nim-e669835665bd3b9ab600d1ce3502f4b643606175.tar.gz |
Mention toSet in the docs of the set type (#21037)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/sets_fragment.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/sets_fragment.txt b/doc/sets_fragment.txt index 4aac75191..fba98db2d 100644 --- a/doc/sets_fragment.txt +++ b/doc/sets_fragment.txt @@ -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: ================== ======================================================== |