Logo

Programming-Idioms

History of Idiom 39 > diff from v31 to v32

Edit summary for version 32 by programming-idioms.org:
[Elixir] +DocURL, +DemoURL

Version 31

2016-11-11, 20:16:57

Version 32

2016-11-30, 21:32:54

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.contains?(s, word)
Code
ok = String.contains?(s, word)
Doc URL
http://elixir-lang.org/docs/stable/elixir/String.html#contains?/2
Demo URL
http://play.elixirbyexample.com/s/8209c9f4be