fork download
  1. name_format <- function(x) gsub("([A-Z])", perl = TRUE, "\\L\\1", gsub("(?!^[A-Z])([A-Z])", perl = TRUE, "_\\L\\1", x))
  2. print(name_format("AccountsOnFile"))
  3.  
Success #stdin #stdout 0.23s 39724KB
stdin
Standard input is empty
stdout
[1] "accounts_on_file"