Generation

generate functionThu, 27 Apr 2023

Comprobar si una cadena contiene a otra cadena.

defmodule StringHelper do def contains?(string, substring) do String.contains?(string, substring) end end IO.puts StringHelper.contains?("Hello world", "world") IO.puts StringHelper.contains?("Hello world", "elixir")

Want to kickstart your project?Use the new AI Studio to create your code