diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
commit | 07fcbb558d797272b9f43547da60beda485873a3 (patch) | |
tree | 77d5da14e9f9d9d8b1d877c70c01296fd3893796 /doc/lispref/strings.texi | |
parent | c9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff) | |
parent | fb81c8c3adf8633f2f617c82f6019aef630860c7 (diff) | |
download | emacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz |
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'doc/lispref/strings.texi')
-rw-r--r-- | doc/lispref/strings.texi | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 5cae939b7bf..b4d7bc729f5 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -390,6 +390,22 @@ whitespace to a single space character, as well as removing all whitespace from the start and the end of @var{string}. @end defun +@defun string-trim-left string &optional regexp +Remove the leading text that matches @var{regexp} from @var{string}. +@var{regexp} defaults to @samp{[ \t\n\r]+}. +@end defun + +@defun string-trim-right string &optional regexp +Remove the trailing text that matches @var{regexp} from @var{string}. +@var{regexp} defaults to @samp{[ \t\n\r]+}. +@end defun + +@defun string-trim string &optional trim-left trim-right +Remove the leading text that matches @var{trim-left} and trailing text +that matches @var{trim-right} from from @var{string}. Both regexps +default to @samp{[ \t\n\r]+}. +@end defun + @defun string-fill string length Attempt to Word-wrap @var{string} so that no lines are longer than @var{length}. Filling is done on whitespace boundaries only. If |