str downcase

For strings.

Convert text to lowercase.

Command Type

built-in

Signature

> str downcase {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

Downcase contents.

> 'NU' | str downcase
nu

Downcase contents.

> 'TESTa' | str downcase
testa

Downcase contents.

> [[ColA ColB]; [Test ABC]] | str downcase ColA
╭───┬──────┬──────╮
│ # │ ColA │ ColB │
├───┼──────┼──────┤
│ 0 │ test │ ABC  │
╰───┴──────┴──────╯

Downcase contents.

> [[ColA ColB]; [Test ABC]] | str downcase ColA ColB
╭───┬──────┬──────╮
│ # │ ColA │ ColB │
├───┼──────┼──────┤
│ 0 │ test │ abc  │
╰───┴──────┴──────╯

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.