onetonfoot / StringCases.jl

simple string mutations for julia 💼

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StringCases

Build Status codecov.io

simple string helper methods for julia

// inspired by ember.js string helpers

Usage

blankcase(cur_string)

cur_string = " foo-BAR  bAZ"

spacecase(cur_string)
# => "foo bar baz"

pascalcase(cur_string)
# => "FooBarBaz"

camelcase(cur_string)
# => "fooBarBaz"

snakecase(cur_string)
# => "foo_bar_baz"

kebabcase(cur_string)
# => "foo-bar-baz"

transformcase(cur_string)

cur_string = "css-class-name"

camelize("css-class-name")
# => "cssClassName"

capitalize("css-class-name")
# => "Css-class-name"

classify("css-class-name")
# => "CssClassName"

dasherize("css-class-name")
# => "css-class-name"

underscore("css-class-name")
# => "css_class_name"
ezoic increase your site revenue

About

simple string mutations for julia 💼

License:Other


Languages

Language:Julia 100.0%