A String Library
from your friend Tori
:wave: :wave: :wave:
string.capitalize()
A capitalization method with many options.
let string = 'hello how are you'
string.capitalize('all')
-> output: HELLO HOW ARE YOU
string.capitalize('firstLetter')
-> output: Hello how are you
string.capitalize('allFirstLetter')
-> output: Hello How Are You
string.clean()
A method that will clean spaces from your strings.
let string = ' hello how are you '
string.clean('trimSpaces')
-> output: 'hello how are you'
string.clean('trimAllSpaces')
-> output: 'hello how are you'
string.changeCase()
A method that will change the casing of your code.
let string = ' hello how are you?'
string.changeCase('kabob')
-> output: hello-how-are-you
string.changeCase('snake')
-> output: hello_how_are_you
string.changeCase('camel')
-> output: helloHowAreYou