aboutsummaryrefslogtreecommitdiff
path: root/src/Edition/Model/Name.elm
diff options
context:
space:
mode:
authorJoris2016-09-04 21:21:11 +0200
committerJoris2016-09-04 21:21:31 +0200
commit973a039b54327df74396605410ea9abe19c8a4e7 (patch)
treec702564d17e0a490d56845027238eb4f231be785 /src/Edition/Model/Name.elm
parent62fee9133f36f655c1ed83e0c2e85394f9948bf5 (diff)
Upgrade to elm 0.17.1
Diffstat (limited to 'src/Edition/Model/Name.elm')
-rw-r--r--src/Edition/Model/Name.elm19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Edition/Model/Name.elm b/src/Edition/Model/Name.elm
new file mode 100644
index 0000000..19f4c04
--- /dev/null
+++ b/src/Edition/Model/Name.elm
@@ -0,0 +1,19 @@
+module Edition.Model.Name exposing
+ ( keyCodeToChar
+ , renderNameEdition
+ )
+
+import Char
+import String
+import List
+
+import Model.Keyboard exposing (KeyCode)
+
+keyCodeToChar : KeyCode -> Maybe Char
+keyCodeToChar = Just << Char.fromCode
+
+renderNameEdition : List Char -> String
+renderNameEdition chars =
+ chars
+ |> List.reverse
+ |> String.fromList