Skip to the content.

camelcase

local camelcase = import "github.com/jsonnet-libs/xtd/camelcase.libsonnet"

camelcase can split camelCase words into an array of words.

Index

Fields

fn split

split(src)

split splits a camelcase word and returns an array of words. It also supports digits. Both lower camel case and upper camel case are supported. It only supports ASCII characters. For more info please check: http://en.wikipedia.org/wiki/CamelCase Based on https://github.com/fatih/camelcase/

fn toCamelCase

toCamelCase(str)

toCamelCase transforms a string to camelCase format, splitting words by the -, _ or spaces. For example: hello_world becomes helloWorld. For more info please check: http://en.wikipedia.org/wiki/CamelCase