mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00

This is based on commit 2731def9159247e6da8a3191783c89683363689c from the zeek-docs repo.
38 lines
922 B
ReStructuredText
38 lines
922 B
ReStructuredText
:tocdepth: 3
|
|
|
|
base/utils/numbers.zeek
|
|
=======================
|
|
|
|
|
|
|
|
Summary
|
|
~~~~~~~
|
|
Functions
|
|
#########
|
|
=============================================== =================================
|
|
:zeek:id:`extract_count`: :zeek:type:`function` Extract an integer from a string.
|
|
=============================================== =================================
|
|
|
|
|
|
Detailed Interface
|
|
~~~~~~~~~~~~~~~~~~
|
|
Functions
|
|
#########
|
|
.. zeek:id:: extract_count
|
|
:source-code: base/utils/numbers.zeek 9 25
|
|
|
|
:Type: :zeek:type:`function` (s: :zeek:type:`string`, get_first: :zeek:type:`bool` :zeek:attr:`&default` = ``T`` :zeek:attr:`&optional`) : :zeek:type:`count`
|
|
|
|
Extract an integer from a string.
|
|
|
|
|
|
:param s: The string to search for a number.
|
|
|
|
|
|
:param get_first: Provide ``F`` if you would like the last number found.
|
|
|
|
|
|
:returns: The request integer from the given string or ``0`` if
|
|
no integer was found.
|
|
|
|
|