Function Repository Resource:

DynamicStringSearch

Source Notebook

Search through many strings dynamically

Contributed by: Michael Sollami

ResourceFunction["DynamicStringSearch"][list]

provides a searchable browser for viewing matching substrings in list.

Details and Options

ResourceFunction["DynamicStringSearch"] takes a List or Association for its argument expr.
ResourceFunction["DynamicStringSearch"] accepts the following options:
Appearance"Horizontal"possible values include "Horizontal","Vertical" or "VeryLong"
LabelingFunctionIdentityfunction for wrapping each of the items in the result set

Examples

Basic Examples (1) 

Browse through a long list of labels:

In[1]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/69bc82a1-0f92-42ce-92c4-e689e1558427"]
Out[2]=

Scope (1) 

Search through the values of an Association:

In[3]:=
countries = Association[(# -> #["Name"]) & /@ CountryData[]];
ResourceFunction["DynamicStringSearch"][countries, LabelingFunction -> (Framed[Style[#, LineBreakWithin -> False], Background -> LightBlue, RoundingRadius -> 5] &)]
Out[4]=

Options (2) 

Set the LabelingFunction option to copy results when clicked:

In[5]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/776e71f2-5a98-4d7a-bc2f-92e5d430e72e"]
Out[6]=

When dealing with more than a few thousand strings use the "VeryLong" option:

In[7]:=
lst = ToString /@ Range[100000];
ResourceFunction["DynamicStringSearch"][lst, Appearance -> "VeryLong"]
Out[8]=

Publisher

Michael Sollami

Version History

  • 1.0.0 – 03 February 2020

Related Resources

Author Notes

DynamicStringSearch uses Kuba' s VerticalScrollbar and ListPane (link) for the "VeryLong" option.

License Information