{"category":"text","endpoint":"https://setget.net/v1/tools/sort-lines","examples":[{"input":{"order":"natural","text":"file10\nfile2\nfile1"},"output":{"lines":3,"removed":0,"text":"file1\nfile2\nfile10"}},{"input":{"text":"banana\nApple\ncherry\napple","unique":true},"output":{"lines":3,"removed":1,"text":"Apple\nbanana\ncherry"},"title":"Alphabetical, ignoring case, without duplicates"},{"input":{"descending":true,"order":"numeric","text":"10 apples\n9 pears\n100 plums"},"output":{"lines":3,"removed":0,"text":"100 plums\n10 apples\n9 pears"},"title":"By leading number, largest first"}],"input_schema":{"additionalProperties":false,"properties":{"case_sensitive":{"default":false,"description":"Treat upper and lower case as different. Capitals then sort before lower case.","type":"boolean"},"descending":{"default":false,"description":"Sort from last to first (Z to A, largest to smallest).","type":"boolean"},"order":{"default":"alphabetical","description":"How to order the lines. \"natural\" sorts numbers inside text by value; \"reverse\" just flips the current order.","enum":["alphabetical","natural","numeric","length","reverse"],"type":"string"},"text":{"description":"The lines to sort.","examples":["file10\nfile2\nfile1"],"type":"string"},"unique":{"default":false,"description":"Remove duplicate lines before sorting.","type":"boolean"}},"required":["text"],"type":"object"},"keywords":["sort lines","alphabetical order","alphabetize","sort list","natural sort","numeric sort","sort by length","reverse lines"],"related":["dedupe-lines","reverse-text","csv-sort-filter-dedupe"],"slug":"sort-lines","summary":"Sort lines alphabetically, naturally (file2 before file10), by number or by length, or reverse their order.","tier":"inline","title":"Sort lines","url":"https://setget.net/tools/sort-lines"}
