docs: Use \ instead of \\ in examples (#7286)

Instead of informing the bell character (hex 07), the example was using
an escaped \ followed by x07.

    $ echo \\x07
    \x07
    $ echo \x07

    $ echo \x07 | od -a
    0000000 bel  nl
    0000002
    $

* docs: Use \u instead of \\u

Instead of informing the Unicode character 慡, this example was using an
escaped \ followed by u6161.

    $ echo \\u6161
    \u6161
    $ echo \u6161
    慡

Before:

    $ string escape --style=var 'a1 b2'\\u6161 | string unescape --style=var
    a1 b2\u6161

Now:

    $ string escape --style=var 'a1 b2'\u6161 | string unescape --style=var
    a1 b2慡
This commit is contained in:
Aurelio Jargas
2020-08-26 18:29:03 +02:00
committed by GitHub
parent 10aa91250d
commit 0304135d2b
8 changed files with 14 additions and 14 deletions

View File

@@ -314,4 +314,4 @@ In contrast to ``grep``, ``string``\ s `match` defaults to glob-mode, while `rep
Like ``sed``\ s `s/` command, ``string replace`` still prints strings that don't match. ``sed``\ s `-n` in combination with a `/p` modifier or command is like ``string replace -f``.
``string split somedelimiter`` is a replacement for ``tr somedelimiter \\n``.
``string split somedelimiter`` is a replacement for ``tr somedelimiter \n``.