diff options
Diffstat (limited to 'doc/lispref/strings.texi')
| -rw-r--r-- | doc/lispref/strings.texi | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 44be529d562..d073d3ffe2f 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi | |||
| @@ -281,6 +281,17 @@ another string, alter a constant string in the program, or even raise | |||
| 281 | an error. To obtain a string that you can safely mutate, use | 281 | an error. To obtain a string that you can safely mutate, use |
| 282 | @code{copy-sequence} on the result. | 282 | @code{copy-sequence} on the result. |
| 283 | 283 | ||
| 284 | If you need to create a string made from @var{n} copies of a given | ||
| 285 | source string @var{source}, you can use @code{concat} as follows: | ||
| 286 | |||
| 287 | @lisp | ||
| 288 | (apply #'concat (make-list @var{n} @var{source})) | ||
| 289 | @end lisp | ||
| 290 | |||
| 291 | @noindent | ||
| 292 | This uses the fact that @code{concat} can take any kind of sequence as | ||
| 293 | its arguments. | ||
| 294 | |||
| 284 | For information about other concatenation functions, see the | 295 | For information about other concatenation functions, see the |
| 285 | description of @code{mapconcat} in @ref{Mapping Functions}, | 296 | description of @code{mapconcat} in @ref{Mapping Functions}, |
| 286 | @code{vconcat} in @ref{Vector Functions}, and @code{append} in @ref{Building | 297 | @code{vconcat} in @ref{Vector Functions}, and @code{append} in @ref{Building |