str camel-case
For strings.
Convert a string to camelCase.
Command Type
built-in
Signature
> str camel-case {flags} ...rest
Parameters
...rest: For a data structure input, convert strings at the given cell paths.
Input/output types:
| input | output |
|---|---|
| string | string |
| list<string> | list<string> |
| table | table |
| record | record |
Examples
convert a string to camelCase
> 'NuShell' | str camel-case
nuShell
convert a string to camelCase
> 'this-is-the-first-case' | str camel-case
thisIsTheFirstCase
convert a string to camelCase
> 'this_is_the_second_case' | str camel-case
thisIsTheSecondCase
convert a column from a table to camelCase
> [[lang, gems]; [nu_test, 100]] | str camel-case lang
╭───┬────────┬──────╮
│ # │ lang │ gems │
├───┼────────┼──────┤
│ 0 │ nuTest │ 100 │
╰───┴────────┴──────╯
Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.