DevToys-app / DevToys

A Swiss Army knife for developers.
https://devtoys.app/
MIT License
26.94k stars 1.45k forks source link

string sorting #1348

Closed anwar-arif closed 2 months ago

anwar-arif commented 2 months ago

What feature or new tool do you think should be added to DevToys?

Given a list of strings, it will show the strings in sorted order alphabetically.

Why do you think this is needed?

In many cases we need to sort a list of strings alphabetically. This feature will become handy for developers.

Solution/Idea

The feature will allow users to provide a list of strings, separated by a comma or space. We can limit the number of strings by some fixed value e.g. 1000. The left panel is the input box, the right panel is the result box as we've seen for other tools in DevToys

Comments

No response

veler commented 2 months ago

Hi, You can already sort lines of text alphabetically using the Text Analyzer & Utilities tool. If your text is separated by comma or space instead of lines, you can first use this DevToys extension to change the delimiter to lines instead of comma/space. https://www.nuget.org/packages/TextDelimiter

image

Then you can use Smart Detection (light bulb) to transfer the output to Text Analyzer & Utilities in 1 shot.

image

From there you can sort lines, and perhaps send them back to Text Delimiter in order to bring back the older delimiter, if needed: image