Logo

Programming-Idioms

History of Idiom 39 > diff from v39 to v40

Edit summary for version 40 by Alexander:
New Clojure implementation by user [Alexander]

Version 39

2019-02-16, 08:59:52

Version 40

2019-02-16, 17:44:50

Idiom #39 Check if string contains a word

Set boolean ok to true if string word is contained in string s as a substring, or to false otherwise.

Idiom #39 Check if string contains a word

Set boolean ok to true if string word is contained in string s as a substring, or to false otherwise.

Imports
(require '[clojure.string :as string])
Code
(def ok (string/includes? word s))
Doc URL
https://clojuredocs.org/clojure.string/includes_q