Logo

Programming-Idioms

History of Idiom 96 > diff from v28 to v29

Edit summary for version 29 by programming-idioms.org:
New Elixir implementation by user [programming-idioms.org]

Version 28

2016-12-10, 17:37:41

Version 29

2017-03-06, 21:22:34

Idiom #96 Check string prefix

Set boolean b to true if string s starts with prefix prefix, false otherwise.

Illustration

Idiom #96 Check string prefix

Set boolean b to true if string s starts with prefix prefix, false otherwise.

Illustration
Code
String.starts_with?(s,prefix)
Doc URL
https://hexdocs.pm/elixir/String.html#starts_with?/2
Demo URL
http://play.elixirbyexample.com/s/3559739da4