summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/subr-x.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-03-25 16:29:07 +0100
committerAndrea Corallo <akrl@sdf.org>2021-03-25 16:29:07 +0100
commitc6c7b30e4b46bf0c8ac5e77546d3938e79f14d56 (patch)
tree77064f18e9e3b324050ff817f16d7bdb917b0514 /lisp/emacs-lisp/subr-x.el
parent92914ade6d3c74ab0a1a7b3820e4707fb0679977 (diff)
parent52a74604160387230c104e3305a5e08fa8c3fdf6 (diff)
downloademacs-c6c7b30e4b46bf0c8ac5e77546d3938e79f14d56.tar.gz
emacs-c6c7b30e4b46bf0c8ac5e77546d3938e79f14d56.tar.bz2
emacs-c6c7b30e4b46bf0c8ac5e77546d3938e79f14d56.zip
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'lisp/emacs-lisp/subr-x.el')
-rw-r--r--lisp/emacs-lisp/subr-x.el22
1 files changed, 0 insertions, 22 deletions
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index a4514454c0b..9c8c967ee9c 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -215,28 +215,6 @@ The variable list SPEC is the same as in `if-let'."
(define-obsolete-function-alias 'string-reverse 'reverse "25.1")
-(defsubst string-trim-left (string &optional regexp)
- "Trim STRING of leading string matching REGEXP.
-
-REGEXP defaults to \"[ \\t\\n\\r]+\"."
- (if (string-match (concat "\\`\\(?:" (or regexp "[ \t\n\r]+") "\\)") string)
- (substring string (match-end 0))
- string))
-
-(defsubst string-trim-right (string &optional regexp)
- "Trim STRING of trailing string matching REGEXP.
-
-REGEXP defaults to \"[ \\t\\n\\r]+\"."
- (let ((i (string-match-p (concat "\\(?:" (or regexp "[ \t\n\r]+") "\\)\\'")
- string)))
- (if i (substring string 0 i) string)))
-
-(defsubst string-trim (string &optional trim-left trim-right)
- "Trim STRING of leading and trailing strings matching TRIM-LEFT and TRIM-RIGHT.
-
-TRIM-LEFT and TRIM-RIGHT default to \"[ \\t\\n\\r]+\"."
- (string-trim-left (string-trim-right string trim-right) trim-left))
-
;;;###autoload
(defun string-truncate-left (string length)
"Truncate STRING to LENGTH, replacing initial surplus with \"...\"."