Skip to content

Instantly share code, notes, and snippets.

@ploeh
Created May 15, 2015 18:37
Show Gist options
  • Save ploeh/4f873315fc556f7672f1 to your computer and use it in GitHub Desktop.
Save ploeh/4f873315fc556f7672f1 to your computer and use it in GitHub Desktop.
F# readability test.
let nerdCapsToKebabCase (text : string) =
let charToString index c =
let s = c.ToString().ToLower()
match index, Char.IsUpper c with
| 0, _ -> s
| _, true -> "-" + s
| _ -> s
text |> Seq.mapi charToString |> String.concat ""
@aschlapsi
Copy link

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment