Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,2 @@
str = "This is a string"
if str =~ ~r/string$/, do: IO.inspect "str ends with 'string'"

View file

@ -0,0 +1,2 @@
str =~ ~r/this/ # => false
str =~ ~r/this/i # => true

View file

@ -0,0 +1,2 @@
str1 = ~r/a/ |> Regex.replace(str,"another")
str2 = str1 |> String.replace(~r/another/,"even another")

View file

@ -0,0 +1 @@
str3 = ~r/another/ |> Regex.replace(str2, fn x -> "#{String.upcase(x)}" end)