Truncates a string to maxLength characters, appending "...". Trims
trailing whitespace left by the cut before appending the ellipsis.
Unifies two near-identical duplicates found in the audit:
luv-autoq-frontend's truncateWordByLetterCount (default limit of 50,
no whitespace trim - despite the name, it cuts by character count, not
word boundaries) and dspace-relaunch's getShortenedString (required
desiredLength param, trims trailing whitespace). Named generically here
since neither original name ("truncate word") accurately described the
character-count behavior both actually have.
Truncates a string to
maxLengthcharacters, appending"...". Trims trailing whitespace left by the cut before appending the ellipsis.Unifies two near-identical duplicates found in the audit:
luv-autoq-frontend'struncateWordByLetterCount(defaultlimitof 50, no whitespace trim - despite the name, it cuts by character count, not word boundaries) anddspace-relaunch'sgetShortenedString(requireddesiredLengthparam, trims trailing whitespace). Named generically here since neither original name ("truncate word") accurately described the character-count behavior both actually have.