Function: bazel--remove-slash
bazel--remove-slash is a natively compiled function defined in
bazel.el.
Signature
(bazel--remove-slash STRING)
Documentation
Remove a final slash from STRING.
Source Code
;; Defined in /nix/store/ws8pkszjvcad1rgzqw6wja7qxacylfhn-emacs-packages-deps/share/emacs/site-lisp/elpa/bazel-20261002.1510/bazel.el
(defun bazel--remove-slash (string)
"Remove a final slash from STRING."
(declare (ftype (function (string) string))
(side-effect-free t))
(cl-check-type string string)
;; Don’t call ‘directory-file-name’ because that tries to invoke filename
;; handlers.
(let ((i (1- (length string))))
(if (and (natnump i) (eql (aref string i) ?/))
(substring-no-properties string 0 i)
string)))