Function: dired-check-switches

dired-check-switches is a byte-compiled function defined in dired.el.gz.

Signature

(dired-check-switches SWITCHES SHORT &optional LONG)

Documentation

Return non-nil if the string SWITCHES matches LONG or SHORT format.

Source Code

;; Defined in /usr/src/emacs/lisp/dired.el.gz
(defun dired-check-switches (switches short &optional long)
  "Return non-nil if the string SWITCHES matches LONG or SHORT format."
  (let (case-fold-search)
    (and (stringp switches)
	 (string-match-p (concat "\\(\\`\\| \\)-[[:alnum:]]*" short
				 (if long (concat "\\|--" long "\\>") ""))
			 switches))))