Every developer has faced this small but annoying task:

You have a list of items in plain text, maybe copied from Excel, a CSV file, a keyword report, a database export, or a document, and now you need to turn it into a clean array.

For example, you may have this:

apple

banana