module Data.Text.LeftPad (leftPad) where

import qualified Data.Text
import Debug.Trace

leftPad :: String -> Int -> String -> String
leftPad s l "" = leftPad' s l ' '
leftPad s l (c:[]) = leftPad' s l c

leftPad' s 0 c = s
leftPad' s n c = if length s < n then [c] ++ leftPad' s (n - 1) c else leftPad' s (n - 1) c