Text Formatter
Apply consistent structure to a document in one pass.
Wrap every line with text before and after, in one pass.
Use {n} in the prefix or suffix to insert the line number.
Prefix & Suffix Text wraps every line at both ends in one pass, with the extras a data format actually needs: escaped quoting, a separator that is correctly omitted after the last line, brackets around the whole block, and a {n} placeholder for the line number.
Wrapping every line of a list is how a column from a spreadsheet becomes something a machine can read. Names become quoted SQL values. URLs become HTML links. Tags become an array. IDs become a set of API calls. All of it is the same operation: something before each line, something after it.
This does both ends in one pass, with the details that turn a nearly-right result into a usable one. Quotes can be added and escaped properly. A separator can go between lines but not after the last one, which is what valid JSON and SQL require. The whole block can be wrapped in brackets. And a {n} placeholder in either the prefix or the suffix is replaced with the line number, so numbered output needs no second pass.
Which is exactly what makes the difference between valid JSON and a syntax error.
Quotes already inside an item are doubled, the convention both SQL and CSV expect.
Opening and closing text around the whole result finishes an array or an IN clause in the same pass.
Put the line number anywhere in the prefix or suffix for numbered or annotated output.
No item consisting only of your wrapper text, unless you explicitly ask for every line.
One item per line, straight from a spreadsheet if you like.
The text to put before and after each line. Use {n} for the line number.
A comma between lines but not after the last one, which is what JSON and SQL need.
Add opening and closing text around the entire result to finish an array or a clause.
Set the prefix and suffix to a double quote, the separator to a comma, and wrap the block in square brackets. The separator is correctly omitted after the last line, so the JSON is valid.
It is replaced with the line number wherever it appears in the prefix or suffix. A prefix of "{n}. " numbers the list; a suffix of " (row {n})" annotates it.
No, they are skipped by default, since wrapping an empty line produces an item with no content. There is a switch to include them when the position matters.
Those do one end each and are simpler to use for a single task. This does both at once and adds the separator, wrapping and numbering that a code or data format needs.
What people who use the Prefix & Suffix Text think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Prefix & Suffix Text. It takes half a minute and no account.
Write the first reviewApply consistent structure to a document in one pass.
Turn a URL slug back into a readable title.
Rank single words, pairs and triples by how often they appear.
Reverse text by character, word or line, or flip it upside down.
Strip letters out and keep the numbers, symbols and structure.
Compare two blocks of text and highlight every added or removed line.
Strip every space from a string, or just the ones you choose.
Put any list into alphabetical order, numbers handled properly.