Logo

Programming-Idioms

History of Idiom 97 > diff from v25 to v26

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

Version 25

2017-03-04, 07:31:09

Version 26

2017-03-06, 21:19:20

Idiom #97 Check string suffix

Set boolean b to true if string s ends with suffix suffix, false otherwise.

Illustration

Idiom #97 Check string suffix

Set boolean b to true if string s ends with suffix suffix, false otherwise.

Illustration
Code
String.ends_with?(s, suffix)
Code
String.ends_with?(s, suffix)
Doc URL
https://hexdocs.pm/elixir/String.html#ends_with?/2
Demo URL
http://play.elixirbyexample.com/s/054606b70d