Update zeek.bif documentation for to_count and to_int

This commit is contained in:
Mark Overholser 2025-02-25 15:18:12 -06:00
parent 3c16b0720a
commit 3acbb55513

View file

@ -2601,10 +2601,13 @@ function enum_to_int%(e: any%): int
return zeek::val_mgr->Int(e->AsEnum()); return zeek::val_mgr->Int(e->AsEnum());
%} %}
## Converts a :zeek:type:`string` to an :zeek:type:`int`. ## Converts a :zeek:type:`string` to an :zeek:type:`int`. For values where
## ``base`` is set to 16, a prefix of ``0x`` or ``0X`` will be ignored.
## ##
## str: The :zeek:type:`string` to convert. ## str: The :zeek:type:`string` to convert.
## ##
## base: The :zeek:type:`count` to use as the numeric base
##
## Returns: The :zeek:type:`string` *str* as :zeek:type:`int`. ## Returns: The :zeek:type:`string` *str* as :zeek:type:`int`.
## ##
## .. zeek:see:: to_addr to_port to_subnet ## .. zeek:see:: to_addr to_port to_subnet
@ -2668,10 +2671,13 @@ function double_to_count%(d: double%): count
return zeek::val_mgr->Count(zeek_uint_t(rint(d))); return zeek::val_mgr->Count(zeek_uint_t(rint(d)));
%} %}
## Converts a :zeek:type:`string` to a :zeek:type:`count`. ## Converts a :zeek:type:`string` to a :zeek:type:`count`. For values where
## ``base`` is set to 16, a prefix of ``0x`` or ``0X`` will be ignored.
## ##
## str: The :zeek:type:`string` to convert. ## str: The :zeek:type:`string` to convert.
## ##
## base: The :zeek:type:`count` to use as the numeric base
##
## Returns: The :zeek:type:`string` *str* as unsigned integer, or 0 if *str* has ## Returns: The :zeek:type:`string` *str* as unsigned integer, or 0 if *str* has
## an invalid format. ## an invalid format.
## ##