Function: s-contains?

s-contains? is a byte-compiled function defined in s.el.

Signature

(s-contains? NEEDLE S &optional IGNORE-CASE)

Documentation

Does S contain NEEDLE?

If IGNORE-CASE is non-nil, the comparison is done without paying attention to case differences.

Aliases

s-contains-p

Source Code

;; Defined in ~/.emacs.d/elpa/s-20220902.1511/s.el
(defun s-contains? (needle s &optional ignore-case)
  "Does S contain NEEDLE?

If IGNORE-CASE is non-nil, the comparison is done without paying
attention to case differences."
  (declare (pure t) (side-effect-free t))
  (let ((case-fold-search ignore-case))
    (s--truthy? (string-match-p (regexp-quote needle) s))))