mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
Copy docs into Zeek repo directly
This is based on commit 2731def9159247e6da8a3191783c89683363689c from the zeek-docs repo.
This commit is contained in:
parent
83f1e74643
commit
ded98cd373
1074 changed files with 169319 additions and 0 deletions
68
doc/scripts/base/utils/strings.zeek.rst
Normal file
68
doc/scripts/base/utils/strings.zeek.rst
Normal file
|
@ -0,0 +1,68 @@
|
|||
:tocdepth: 3
|
||||
|
||||
base/utils/strings.zeek
|
||||
=======================
|
||||
|
||||
Functions to assist with small string analysis and manipulation that can
|
||||
be implemented as Zeek functions and don't need to be implemented as built-in
|
||||
functions.
|
||||
|
||||
|
||||
Summary
|
||||
~~~~~~~
|
||||
Functions
|
||||
#########
|
||||
================================================== ==================================================================
|
||||
:zeek:id:`cut_tail`: :zeek:type:`function` Cut a number of characters from the end of the given string.
|
||||
:zeek:id:`is_string_binary`: :zeek:type:`function` Returns true if the given string is at least 25% composed of 8-bit
|
||||
characters.
|
||||
:zeek:id:`string_escape`: :zeek:type:`function` Given a string, returns an escaped version.
|
||||
================================================== ==================================================================
|
||||
|
||||
|
||||
Detailed Interface
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
Functions
|
||||
#########
|
||||
.. zeek:id:: cut_tail
|
||||
:source-code: base/utils/strings.zeek 35 40
|
||||
|
||||
:Type: :zeek:type:`function` (s: :zeek:type:`string`, tail_len: :zeek:type:`count`) : :zeek:type:`string`
|
||||
|
||||
Cut a number of characters from the end of the given string.
|
||||
|
||||
|
||||
:param s: a string to trim.
|
||||
|
||||
|
||||
:param tail_len: the number of characters to remove from the end of the string.
|
||||
|
||||
|
||||
:returns: the given string with *tail_len* characters removed from the end.
|
||||
|
||||
.. zeek:id:: is_string_binary
|
||||
:source-code: base/utils/strings.zeek 7 10
|
||||
|
||||
:Type: :zeek:type:`function` (s: :zeek:type:`string`) : :zeek:type:`bool`
|
||||
|
||||
Returns true if the given string is at least 25% composed of 8-bit
|
||||
characters.
|
||||
|
||||
.. zeek:id:: string_escape
|
||||
:source-code: base/utils/strings.zeek 20 26
|
||||
|
||||
:Type: :zeek:type:`function` (s: :zeek:type:`string`, chars: :zeek:type:`string`) : :zeek:type:`string`
|
||||
|
||||
Given a string, returns an escaped version.
|
||||
|
||||
|
||||
:param s: a string to escape.
|
||||
|
||||
|
||||
:param chars: a string containing all the characters that need to be escaped.
|
||||
|
||||
|
||||
:returns: a string with all occurrences of any character in *chars* escaped
|
||||
using ``\``, and any literal ``\`` characters likewise escaped.
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue