Add string-chop-newline

* doc/lispref/strings.texi (Creating Strings): Document it.
* lisp/emacs-lisp/subr-x.el (string-chop-newline): Add new function.
This commit is contained in:
Lars Ingebrigtsen 2020-12-21 22:05:37 +01:00
parent e967ba3018
commit f329a3180e
5 changed files with 16 additions and 1 deletions

View file

@ -181,6 +181,8 @@ There can be any number of :example/:result elements."
(string-remove-prefix
:no-manual t
:eval (string-remove-prefix "foo" "foobar"))
(string-chop-newline
:eval (string-chop-newline "foo\n"))
(string-clean-whitespace
:eval (string-clean-whitespace " foo bar "))
(string-fill