W3cubDocs

/Nushell

char for strings

Output special characters (e.g., 'newline').

Signature

> char {flags} (character) ...rest

Flags

  • --list, -l: List all supported character names
  • --unicode, -u: Unicode string i.e. 1f378
  • --integer, -i: Create a codepoint from an integer

Parameters

  • character: the name of the character to output
  • ...rest: multiple Unicode bytes

Input/output types:

input output
nothing string

Examples

Output newline

>char newline


List available characters

>char--list

Output prompt character, newline and a hamburger menu character

> (char prompt) + (char newline) + (char hamburger)


Output Unicode character

>char-u1f378
🍸

Create Unicode from integer codepoint values

>char-i (0x60+1) (0x60+2)
ab

Output multi-byte Unicode character

>char-u1F468200D1F466200D1F466
👨‍👦‍👦

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/char.html