Rename slice-string to string-slice

* lisp/emacs-lisp/subr-x.el (string-slice): Rename from slice-string.
* doc/lispref/strings.texi (Creating Strings): Ditto.
This commit is contained in:
Lars Ingebrigtsen 2020-12-21 20:18:57 +01:00
parent b3dec31766
commit cf2e832185
5 changed files with 12 additions and 12 deletions

View file

@ -602,11 +602,11 @@
(should (equal (string-lines "foo") '("foo")))
(should (equal (string-lines "foo \nbar") '("foo " "bar"))))
(ert-deftest subr-slice-string ()
(should (equal (slice-string "foo-bar" "-") '("foo" "-bar")))
(should (equal (slice-string "foo-bar-" "-") '("foo" "-bar" "-")))
(should (equal (slice-string "-foo-bar-" "-") '("-foo" "-bar" "-")))
(should (equal (slice-string "ooo" "lala") '("ooo"))))
(ert-deftest subr-string-slice ()
(should (equal (string-slice "foo-bar" "-") '("foo" "-bar")))
(should (equal (string-slice "foo-bar-" "-") '("foo" "-bar" "-")))
(should (equal (string-slice "-foo-bar-" "-") '("-foo" "-bar" "-")))
(should (equal (string-slice "ooo" "lala") '("ooo"))))
(ert-deftest subr-string-pad ()
(should (equal (string-pad "foo" 5) "foo "))