mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Merge branch 'patch-4' of https://github.com/moshekaplan/bro
* 'patch-4' of https://github.com/moshekaplan/bro: Clarified string documentation
This commit is contained in:
commit
46aafdc87b
3 changed files with 12 additions and 9 deletions
|
@ -150,18 +150,17 @@ Here is a more detailed description of each type:
|
|||
|
||||
.. bro:type:: string
|
||||
|
||||
A type used to hold character-string values which represent text, although
|
||||
strings in a Bro script can actually contain any arbitrary binary data.
|
||||
A type used to hold bytes which represent text and also can hold
|
||||
arbitrary binary data.
|
||||
|
||||
String constants are created by enclosing text within a pair of double
|
||||
quotes ("). A string constant cannot span multiple lines in a Bro script.
|
||||
The backslash character (\\) introduces escape sequences. The
|
||||
following escape sequences are recognized: ``\n``, ``\t``, ``\v``, ``\b``,
|
||||
The backslash character (\\) introduces escape sequences. Bro recognizes
|
||||
the following escape sequences: ``\\``, ``\n``, ``\t``, ``\v``, ``\b``,
|
||||
``\r``, ``\f``, ``\a``, ``\ooo`` (where each 'o' is an octal digit),
|
||||
``\xhh`` (where each 'h' is a hexadecimal digit). For escape sequences
|
||||
that don't match any of these, Bro will just remove the backslash (so
|
||||
to represent a literal backslash in a string constant, you just use
|
||||
two consecutive backslashes).
|
||||
``\xhh`` (where each 'h' is a hexadecimal digit). If Bro does not
|
||||
recognize an escape sequence, Bro will ignore the backslash
|
||||
("\\g" becomes "g").
|
||||
|
||||
Strings support concatenation (``+``), and assignment (``=``, ``+=``).
|
||||
Strings also support the comparison operators (``==``, ``!=``, ``<``,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue