Function: helpful--chars-before

helpful--chars-before is a natively compiled function defined in helpful.el.

Signature

(helpful--chars-before POS N)

Documentation

Return up to N chars before POS in the current buffer.

The string may be shorter than N or empty if out-of-range.

Source Code

;; Defined in /nix/store/mvfc1hll8a1f23ivm3qmzj4bn64jr3x7-emacs-packages-deps/share/emacs/site-lisp/elpa/helpful-20250408.334/helpful.el
(defun helpful--chars-before (pos n)
  "Return up to N chars before POS in the current buffer.
The string may be shorter than N or empty if out-of-range."
  (buffer-substring
   (max (point-min) (- pos n))
   pos))