From fa242099f78957d0c917634126a9f0423aaab1dd Mon Sep 17 00:00:00 2001 From: Aleksei Matiushkin Date: Thu, 14 Feb 2019 10:29:22 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20split=20on=20digits=20when=20pr?= =?UTF-8?q?ovided=20:symbol=20as=20delim.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/recase/cases/generic.ex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/recase/cases/generic.ex b/lib/recase/cases/generic.ex index de1da15..a43e0bc 100644 --- a/lib/recase/cases/generic.ex +++ b/lib/recase/cases/generic.ex @@ -12,8 +12,10 @@ defmodule Recase.Generic do list :symbol -> - [all, down, up] = Enum.map([32..127, ?a..?z, ?A..?Z], &Enum.to_list/1) - all -- (down ++ up) + [all, digits, down, up] = + Enum.map([32..127, ?0..?9, ?a..?z, ?A..?Z], &Enum.to_list/1) + + all -- (digits ++ down ++ up) end) @doc """