Text Truncate API
POST
https://api.findutils.com/api/tools/text-truncate/execute Truncate text to a maximum number of characters, or of words, optionally cutting at the last word boundary, with a suffix.
Request body
application/json-
text
string required
Text to truncate.
-
length
integer optional
Max characters in output. Defaults to 100. Default
100. -
suffix
string optional
Appended when truncation occurs. Defaults to "...". Default
"...". -
word_boundary
boolean optional
Cut at last space before limit. Defaults to true. Ignored when unit is "words". Default
true. -
unit
string optional
Whether `length` counts characters or words. Defaults to characters. One of
characters · words. Default"characters".
Example arguments
Verified{
"text": "hello world",
"max_length": 5
} More Text tools
- Bookmarks Diff Compare two Netscape bookmarks.html exports (before and after) and list the links that were added, removed, or changed.
- Case Convert Convert a string between camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE, Title Case, Sentence case, lower, UPPER.
- Citation Generator Generate a reference-list citation in APA 7, MLA 9, Chicago, or Harvard style for a book, website, journal, or article.
- Code Diff Checker Returns a line-by-line diff of two code snippets: each line marked added, removed or unchanged with its original and modified line numbers…
- Code Highlight Html Returns syntax-highlighted HTML for a code snippet: HTML-escaped text wrapped in <span style="color: ..."> elements using one of six colour…
- Dedupe Bookmarks Remove duplicate links from a Netscape bookmarks.html export (Chrome, Firefox, Edge, Safari) and return a clean bookmarks.html plus a CSV…