Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

str screaming-snake-case for strings

Convert a string to SCREAMING_SNAKE_CASE.

Signature

> str screaming-snake-case {flags} ...rest

Parameters

  • ...rest: For a data structure input, convert strings at the given cell paths.

Input/output types:

inputoutput
stringstring
list<string>list<string>
tabletable
recordrecord

Examples

convert a string to SCREAMING_SNAKE_CASE

>  "NuShell" | str screaming-snake-case
NU_SHELL

convert a string to SCREAMING_SNAKE_CASE

>  "this_is_the_second_case" | str screaming-snake-case
THIS_IS_THE_SECOND_CASE

convert a string to SCREAMING_SNAKE_CASE

> "this-is-the-first-case" | str screaming-snake-case
THIS_IS_THE_FIRST_CASE

convert a column from a table to SCREAMING_SNAKE_CASE

> [[lang, gems]; [nu_test, 100]] | str screaming-snake-case lang
╭───┬─────────┬──────╮
│ # │  lang   │ gems │
├───┼─────────┼──────┤
│ 0 │ NU_TEST │  100 │
╰───┴─────────┴──────╯