diff options
| author | Mattias EngdegÄrd | 2023-06-23 19:42:44 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2023-06-24 12:27:08 +0200 |
| commit | d0147ff9e507cc4e99e0574eab106f95c8e9df1f (patch) | |
| tree | d60e5ad73ee7b4f94630ad81a0afea78b6c1a870 | |
| parent | fa06249a9fbb0b0b67eb0d88cdb70b61723e67ed (diff) | |
| download | emacs-d0147ff9e507cc4e99e0574eab106f95c8e9df1f.tar.gz emacs-d0147ff9e507cc4e99e0574eab106f95c8e9df1f.zip | |
* lisp/emacs-lisp/shortdoc.el: More and better `substring` examples.
Suggested by Juri Linkov.
| -rw-r--r-- | lisp/emacs-lisp/shortdoc.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index c49960c2ee6..871233097a7 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el | |||
| @@ -187,8 +187,10 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'), | |||
| 187 | :eval (format "This number is %d" 4)) | 187 | :eval (format "This number is %d" 4)) |
| 188 | "Manipulating Strings" | 188 | "Manipulating Strings" |
| 189 | (substring | 189 | (substring |
| 190 | :eval (substring "foobar" 0 3) | 190 | :eval (substring "abcde" 1 3) |
| 191 | :eval (substring "foobar" 3)) | 191 | :eval (substring "abcde" 2) |
| 192 | :eval (substring "abcde" 1 -1) | ||
| 193 | :eval (substring "abcde" -4 4)) | ||
| 192 | (string-limit | 194 | (string-limit |
| 193 | :eval (string-limit "foobar" 3) | 195 | :eval (string-limit "foobar" 3) |
| 194 | :eval (string-limit "foobar" 3 t) | 196 | :eval (string-limit "foobar" 3 t) |