Skip to content

Commit

Permalink
snakecase
Browse files Browse the repository at this point in the history
  • Loading branch information
aa1024 committed Apr 9, 2018
1 parent 4cc5d57 commit a7fb65c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libs/str.q
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@

\d .str

/@function sc @desc Snakecase : underscore separated text , but the case is preserverd
/ @param string
/@returns underscore separated text without any case changes.
sc:{ ssr[x;" ";"_"] }

tc:{ "-"sv cut[0,where[x=upper x]; x] }
tc:{ ssr[x;" ";"-"] }


/@function us @desc Camel case to lower case underscore separated
Expand Down

0 comments on commit a7fb65c

Please sign in to comment.