StringCases.jl

Simple string mutations for julia ๐Ÿ’ผ
Author djsegal
Popularity
11 Stars
Updated Last
6 Months Ago
Started In
November 2017

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"

Required Packages

No packages found.