mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 23:08:00 +01:00
10 lines
202 B
Elixir
10 lines
202 B
Elixir
|
defmodule Search.String do
|
||
|
def normalize(str) do
|
||
|
str
|
||
|
|> String.replace("\r", "")
|
||
|
|> String.split("\n", trim: true)
|
||
|
|> Enum.map(fn s -> "(#{s})" end)
|
||
|
|> Enum.join(" || ")
|
||
|
end
|
||
|
end
|