Logo

Programming-Idioms

History of Idiom 39 > diff from v19 to v20

Edit summary for version 20 by :
New Erlang implementation by user [elbrujohalcon]

Version 19

2015-11-30, 12:37:28

Version 20

2015-12-18, 03:10:03

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.

Code
Ok = string:str(S, Word) > 0.
Doc URL
http://erldocs.com/current/stdlib/string.html?i=0&search=string:st#str/2
Demo URL
http://tryerl.seriyps.ru/#id=1bf3