31 lines
444 B
Fennel
31 lines
444 B
Fennel
(fn capitalize [s]
|
|
(s:gsub "." string.upper 1))
|
|
|
|
(fn uppercase [s]
|
|
(string.upper s))
|
|
|
|
(fn lowercase [s]
|
|
(string.lower s))
|
|
|
|
(fn plural [s]
|
|
(.. s :s))
|
|
|
|
{
|
|
:capitalize {
|
|
:call [:c :cap :capital :capitalize]
|
|
:fun capitalize
|
|
}
|
|
:uppercase {
|
|
:call [:u :upper :uppercase]
|
|
:fun uppercase
|
|
}
|
|
:lowercase {
|
|
:call [:l :lower :lowercase]
|
|
:fun lowercase
|
|
}
|
|
:plural {
|
|
:call [:s :plural :pluralize]
|
|
:fun plural
|
|
}
|
|
}
|