We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4de092 commit 6a4b911Copy full SHA for 6a4b911
core/commonMain/src/extensions.kt
@@ -589,6 +589,14 @@ fun CharSequence.toPersistentList(): PersistentList<Char> =
589
fun CharSequence.toPersistentSet(): PersistentSet<Char> =
590
persistentSetOf<Char>().mutate { this.toCollection(it) }
591
592
+/**
593
+ * Returns a persistent set of all characters.
594
+ *
595
+ * Order of the elements in the returned set is unspecified.
596
+ */
597
+fun CharSequence.toPersistentHashSet(): PersistentSet<Char> =
598
+ persistentHashSetOf<Char>().mutate { this.toCollection(it) }
599
+
600
601
/**
602
* Returns an immutable set of all elements of this collection.
0 commit comments