* lisp/emacs-lisp/shortdoc.el: More and better substring examples.

Suggested by Juri Linkov.
This commit is contained in:
Mattias Engdegård 2023-06-23 19:42:44 +02:00
parent fa06249a9f
commit d0147ff9e5

View file

@ -187,8 +187,10 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'),
:eval (format "This number is %d" 4))
"Manipulating Strings"
(substring
:eval (substring "foobar" 0 3)
:eval (substring "foobar" 3))
:eval (substring "abcde" 1 3)
:eval (substring "abcde" 2)
:eval (substring "abcde" 1 -1)
:eval (substring "abcde" -4 4))
(string-limit
:eval (string-limit "foobar" 3)
:eval (string-limit "foobar" 3 t)