Function: kbd-key:remove-delimiters

kbd-key:remove-delimiters is a byte-compiled function defined in hib-kbd.el.

Signature

(kbd-key:remove-delimiters STR START-DELIM END-DELIM)

Documentation

Return STR sans START-DELIM and END-DELIM (strings).

Return nil if STR does not start and end with the given delimiters.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hib-kbd.el
(defun kbd-key:remove-delimiters (str start-delim end-delim)
  "Return STR sans START-DELIM and END-DELIM (strings).
Return nil if STR does not start and end with the given delimiters."
  (when (and (string-match (format "\\`%s" (regexp-quote start-delim)) str)
	     (string-match (format "%s\\'"  (regexp-quote end-delim)) str))
    (string-trim str start-delim end-delim)))