Function: s-index-of

s-index-of is a byte-compiled function defined in s.el.

Signature

(s-index-of NEEDLE S &optional IGNORE-CASE)

Documentation

Returns first index of NEEDLE in S, or nil.

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

Source Code

;; Defined in ~/.emacs.d/elpa/s-20220902.1511/s.el
(defun s-index-of (needle s &optional ignore-case)
  "Returns first index of NEEDLE in S, or nil.

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))
    (string-match-p (regexp-quote needle) s)))