Function: eca-completion--string-common-prefix
eca-completion--string-common-prefix is a natively compiled function
defined in eca-completion.el.
Signature
(eca-completion--string-common-prefix STR1 STR2)
Documentation
Find the common prefix of STR1 and STR2 directly.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-completion.el
(defun eca-completion--string-common-prefix (str1 str2)
"Find the common prefix of STR1 and STR2 directly."
(let ((min-len (min (length str1) (length str2)))
(i 0))
(while (and (< i min-len)
(= (aref str1 i) (aref str2 i)))
(setq i (1+ i)))
(substring str1 0 i)))