Skip to content

Commit 30eed19

Browse files
authored
Add hint for generating \0 character to strings guide (#2014)
* Add hint for generating \0 character to strings guide The Working with Strings guide lists supported escape characters (eg: `\n`, `\t`) but `\0` is not supported by double quote strings. Include an example of generating `NUL` via `\u{0}`, as well as pointing to combining string interpolation with `chars --integer 0`. * Suggest `char nul` over `char --integer 0`
1 parent affa619 commit 30eed19

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

book/working_with_strings.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ Nushell currently supports the following escape characters:
5656
- `\n` - newline (line feed)
5757
- `\t` - tab
5858
- `\u{X...}` - a single unicode character, where X... is 1-6 hex digits (0-9, A-F)
59+
60+
To create a `\0` (`NUL`) character, you may use `\u{0}` or
61+
[string interpolation](#string-interpolation) with [`(char nul)`](/commands/docs/char.md).
5962

6063
## Raw Strings
6164

0 commit comments

Comments
 (0)