aboutsummaryrefslogtreecommitdiff
path: root/src/Model/Edition/NameEdition.elm
blob: be7c6b33d46e0a7e5a329c905f9f54ff694dd668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module Model.Edition.NameEdition
  ( keyCodeToChar
  , renderNameEdition
  ) where

import Char
import Keyboard exposing (KeyCode)
import String
import List

keyCodeToChar : KeyCode -> Maybe Char
keyCodeToChar = Just << Char.fromCode

renderNameEdition : List Char -> String
renderNameEdition chars =
  chars
    |> List.reverse
    |> String.fromList