Numbers can also sort/alphabetize by any selected column. Other spreadsheet apps can probably do this as well.
I don't know of any text app that will do so, however; if a text (txt) file has it's sufix changed to .csv (coma separated values), then it can be imported into a spreadsheet. Each line feed becomes a new row. Comas inbetween linefeeds are interpreted as new columns.
A single column list should be importable, as long as you are careful not to use any comas.
a text file like this
First, Last, Hobby, Notes
Roger, Dime, coin collecting
Tom, Thumb, collectables, mostly Disney
Nancy, North, dog sledding
Wayne, Good,,won't say but giggles a lot
After changing to .csv and importing into a spreadsheet would look like this.
You can select and sort by each column.
Probably not what you are looking for, but there it is.
To sort in Numbers (because those with it may ask) you tap on the table to select it, then select the column by tapping the gray bar above it. Sort should be one of the options in the popup menu. Options may vary depending on the date type in the column.