Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 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)