diff --git a/src/zeek.bif b/src/zeek.bif index 7d9320ad3b..65e2127ef7 100644 --- a/src/zeek.bif +++ b/src/zeek.bif @@ -2601,10 +2601,13 @@ function enum_to_int%(e: any%): int 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. ## +## base: The :zeek:type:`count` to use as the numeric base +## ## Returns: The :zeek:type:`string` *str* as :zeek:type:`int`. ## ## .. 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))); %} -## 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. ## +## 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 ## an invalid format. ##