{"category":"text","endpoint":"https://setget.net/v1/tools/truncate-middle","examples":[{"input":{"max_length":20,"text":"The quick brown fox jumps over the lazy dog"},"output":{"original_length":43,"removed":24,"text":"The quick \u2026 lazy dog","truncated":true}},{"input":{"marker":"...","max_length":26,"text":"/home/sam/projects/website/assets/images/logo.png","where":"start"},"output":{"original_length":49,"removed":26,"text":".../assets/images/logo.png","truncated":true},"title":"Keeping the end of a path"},{"input":{"max_length":20,"text":"Short text"},"output":{"original_length":10,"removed":0,"text":"Short text","truncated":false},"title":"Already short enough"}],"input_schema":{"additionalProperties":false,"properties":{"marker":{"default":"\u2026","description":"Text that stands in for the removed part.","maxLength":20,"type":"string"},"max_length":{"default":80,"description":"Longest result allowed, in characters, including the marker.","maximum":1000000,"minimum":1,"type":"integer"},"text":{"description":"The text to shorten.","examples":["The quick brown fox jumps over the lazy dog"],"type":"string"},"where":{"default":"middle","description":"Which part to cut out. \"middle\" keeps the start and the end.","enum":["start","middle","end"],"type":"string"}},"required":["text"],"type":"object"},"keywords":["truncate","shorten text","ellipsis","trim text","middle ellipsis","cut text","abbreviate","text preview","excerpt"],"related":["text-chunk","wrap-indent","token-estimate"],"slug":"truncate-middle","summary":"Shorten long text to a maximum length, cutting from the middle, start or end and marking the cut with an ellipsis.","tier":"inline","title":"Truncate text","url":"https://setget.net/tools/truncate-middle"}
