From e669835665bd3b9ab600d1ce3502f4b643606175 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Thu, 8 Dec 2022 10:58:00 +0100 Subject: [PATCH] Mention toSet in the docs of the set type (#21037) --- doc/sets_fragment.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/sets_fragment.txt b/doc/sets_fragment.txt index 4aac75191f..fba98db2d9 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: ================== ========================================================