Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find the distinct characters in multiple strings
| ResourceFunction["StringUnion"][s1,s2,…] gives a string containing all the distinct characters in any of the si. | 
Find characters contained in a couple of strings:
| In[1]:= | ![ResourceFunction["StringUnion"]["Hello", "World"]](https://www.wolframcloud.com/obj/resourcesystem/images/f36/f36d8aeb-6ee3-4838-b002-5f08f6158dd7/58009e83d8d09e2f.png) | 
| Out[1]= |  | 
Use any number of strings:
| In[2]:= | ![ResourceFunction[
 "StringUnion"]["Which of the characters are distinct?", "Some of these", "And some of these", "Don't forget these"]](https://www.wolframcloud.com/obj/resourcesystem/images/f36/f36d8aeb-6ee3-4838-b002-5f08f6158dd7/240a11f0a97df24b.png) | 
| Out[2]= |  | 
All characters are supported:
| In[3]:= | ![{str1, str2} = TextCases[ResourceData["The Odyssey - Greek"], "Sentence"][[1 ;; 2]]](https://www.wolframcloud.com/obj/resourcesystem/images/f36/f36d8aeb-6ee3-4838-b002-5f08f6158dd7/68f5eff71f7e73e1.png) | 
| Out[3]= |  | 
| In[4]:= | ![ResourceFunction["StringUnion"][str1, str2]](https://www.wolframcloud.com/obj/resourcesystem/images/f36/f36d8aeb-6ee3-4838-b002-5f08f6158dd7/78ca066b18e578fc.png) | 
| Out[4]= |  | 
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License