Function: gnus-advanced-string

gnus-advanced-string is a byte-compiled function defined in gnus-logic.el.gz.

Signature

(gnus-advanced-string INDEX MATCH TYPE)

Documentation

See whether string MATCH of TYPE matches gnus-advanced-headers in INDEX.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-logic.el.gz
(defun gnus-advanced-string (index match type)
  "See whether string MATCH of TYPE matches `gnus-advanced-headers' in INDEX."
  (let* ((type (or type 's))
	 (case-fold-search (not (eq (downcase (symbol-name type))
				    (symbol-name type))))
	 (header (or (aref gnus-advanced-headers index) "")))
    (cond
     ((memq type '(r R regexp Regexp))
      (string-match match header))
     ((memq type '(s S string String))
      (string-match (regexp-quote match) header))
     ((memq type '(e E exact Exact))
      (string= match header))
     ((memq type '(f F fuzzy Fuzzy))
      (string-match (regexp-quote (gnus-simplify-subject-fuzzy match))
		    header))
     (t
      (error "No such string match type: %s" type)))))