KebabCase
Convert a string to kebab case
Method Signature
KebabCase(string=[string])Arguments
Argument
Type
Required
Description
Default
string
string
true
The target string
Examples
Convert a string to kebab-case
result = kebabCase( "helloWorld" );
writeOutput( result );
Result: hello-world
Convert snake_case to kebab-case
result = kebabCase( "my_variable_name" );
writeOutput( result );
Result: my-variable-name
Using the member function
Result: foo-bar-baz
Related
Last updated
Was this helpful?
