Skip to content

Commit 4b63144

Browse files
committed
add helper to remove non-ascii chars
1 parent c5a1f4f commit 4b63144

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/algora/shared/util.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,4 +280,8 @@ defmodule Algora.Util do
280280
)
281281
|> String.trim()
282282
end
283+
284+
def remove_non_ascii(string) do
285+
String.replace(string, ~r/[^a-zA-Z]/, "")
286+
end
283287
end

0 commit comments

Comments
 (0)