Logo

Programming-Idioms

History of Idiom 97 > diff from v39 to v40

Edit summary for version 40 by programming-idioms.org:
[Elixir] Dead link: play.elixirbyexample.com has been down for a while

Version 39

2019-09-28, 11:48:56

Version 40

2019-10-14, 12:27:56

Idiom #97 Check string suffix

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

Illustration

Idiom #97 Check string suffix

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

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