Function: haskell-string-trim-suffix

haskell-string-trim-suffix is a natively compiled function defined in haskell-string.el.

Signature

(haskell-string-trim-suffix SUFFIX STR)

Documentation

If SUFFIX is suffix of STR, the string is trimmed.

Source Code

;; Defined in /nix/store/9lz2mhw95f9fqxr9mnq46k3f6qz3aq83-emacs-packages-deps/share/emacs/site-lisp/elpa/haskell-mode-20260904.1042/haskell-string.el
(defun haskell-string-trim-suffix (suffix str)
  "If SUFFIX is suffix of STR, the string is trimmed."
  (when (and (stringp suffix)
             (stringp str))
    (if (string-suffix-p suffix str)
        (substring str 0 (* -1 (length suffix))))))