str kebab-case
for strings> str kebab-case {flags} ...rest
...rest
: For a data structure input, convert strings at the given cell pathsinput | output |
---|---|
list<string> | list<string> |
record | record |
string | string |
table | table |
convert a string to kebab-case
>'NuShell'|str kebab-case
nu-shell
convert a string to kebab-case
>'thisIsTheFirstCase'|str kebab-case
this-is-the-first-case
convert a string to kebab-case
>'THIS_IS_THE_SECOND_CASE'|str kebab-case
this-is-the-second-case
convert a column from a table to kebab-case
> [[lang, gems]; [nuTest, 100]] |str kebab-caselang
╭───┬─────────┬──────╮
│# │ lang │ gems │
├───┼─────────┼──────┤
│0│nu-test│100│
╰───┴─────────┴──────╯
Tips: Command str kebab-case
was not included in the official binaries by default, you have to build it with --features=extra
flag
Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/str_kebab-case.html