Function: gdbmi-same-start

gdbmi-same-start is a byte-compiled function defined in gdb-mi.el.gz.

Signature

(gdbmi-same-start STR OFFSET MATCH)

Documentation

Return non-nil if STR and MATCH are equal up to the end of either strings.

OFFSET is the position in STR at which the comparison takes place.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
(defun gdbmi-same-start (str offset match)
  "Return non-nil if STR and MATCH are equal up to the end of either strings.
OFFSET is the position in STR at which the comparison takes place."
  (let* ((str-length (- (length str) offset))
	 (match-length (length match))
	 (compare-length (min str-length match-length)))
    (when (> compare-length 0)
      (string-equal (substring str offset (+ offset compare-length))
		    (substring match 0 compare-length)))))