aboutsummaryrefslogtreecommitdiff
path: root/src/Edition/Model/Name.elm
diff options
context:
space:
mode:
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