* lisp/emacs-lisp/subr-x.el (string-limit): Mention
truncate-string-to-width in the doc string.
:eval (string-limit "foobar" 3)
:eval (string-limit "foobar" 3 t)
:eval (string-limit "foobar" 10))
+ (truncate-string-to-width
+ :eval (truncate-string-to-width "foobar" 3)
+ :eval (truncate-string-to-width "你好bar" 5))
(split-string
:eval (split-string "foo bar")
:eval (split-string "|foo|bar|" "|")
If STRING is longer than LENGTH, return a substring consisting of
the first LENGTH characters of STRING. If END is non-nil, return
-the last LENGTH characters instead."
+the last LENGTH characters instead.
+
+When shortening strings for display purposes,
+`truncate-string-to-width' is almost always a better alternative
+than this function."
(unless (natnump length)
(signal 'wrong-type-argument (list 'natnump length)))
(cond