Add example of worse camelTo behavior for clarity
commit935fd7a4bb803f8afffc7abd288703ce9ae0b33f
authorKostiantyn Rybnikov <k-bx@k-bx.com>
dateMon 13 Jul 2015, 17:41 (11 years ago)
parentd4132fb
Data/Aeson/Types/Internal.hs+1
@@ -535,6 +535,7 @@ camelTo c = lastWasCap True
535535
536536-- | Better version of 'camelTo'. Example where it works better:
537537--
538+-- > camelTo '_' 'CamelAPICase' == "camel_apicase"
538539-- > camelTo2 '_' 'CamelAPICase' == "camel_api_case"
539540camelTo2 :: Char -> String -> String
540541camelTo2 c = map toLower . go2 . go1