Open evantianx opened 5 years ago
import Data.List.Split
import Data.Char
capitalize :: String -> String
capitalize [] = []
capitalize (x:xs) = toUpper x : xs
toCamelCase :: String -> String
toCamelCase str = concat $ head words : map capitalize (tail words)
where words = splitOneOf "-_" str
Complete the method/function so that it converts dash/underscore delimited words into camel casing. The first word within the output should be capitalized only if the original word was capitalized.
Examples