mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Reformat strings.bif Zeekygen comments to fix Sphinx warnings
This commit is contained in:
parent
4f53e48750
commit
f6e48c3a18
4 changed files with 41 additions and 28 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
||||||
|
|
||||||
|
3.3.0-dev.224 | 2020-09-01 11:57:44 -0700
|
||||||
|
|
||||||
|
* Reformat strings.bif Zeekygen comments to fix Sphinx warnings (Jon Siwek, Corelight)
|
||||||
|
|
||||||
3.3.0-dev.221 | 2020-08-31 17:31:21 -0700
|
3.3.0-dev.221 | 2020-08-31 17:31:21 -0700
|
||||||
|
|
||||||
* GH-174: Treat ambiguous attribute duplication as an error (Tim Wojtulewicz, Corelight)
|
* GH-174: Treat ambiguous attribute duplication as an error (Tim Wojtulewicz, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
3.3.0-dev.221
|
3.3.0-dev.224
|
||||||
|
|
2
doc
2
doc
|
@ -1 +1 @@
|
||||||
Subproject commit 0ae35c11a65f961038e7717b0e09529af025017f
|
Subproject commit 3b292fa792d5a0c8a67d9ecd8ce3f3b14749449f
|
|
@ -1218,35 +1218,38 @@ static int64_t do_find_str(zeek::StringVal* str, zeek::StringVal* sub, int64_t s
|
||||||
|
|
||||||
%%}
|
%%}
|
||||||
|
|
||||||
## Finds a string within another string, starting from the beginning. This works by taking a substring within
|
## Finds a string within another string, starting from the beginning. This works
|
||||||
## the provided indexes and searching for the sub argument. This means that ranges shorter than the string in
|
## by taking a substring within the provided indexes and searching for the sub
|
||||||
## the sub argument will always return a failure.
|
## argument. This means that ranges shorter than the string in the sub argument
|
||||||
|
## will always return a failure.
|
||||||
##
|
##
|
||||||
## str: The string to search in.
|
## str: The string to search in.
|
||||||
## substr: The string to search for.
|
## substr: The string to search for.
|
||||||
## start: An optional position for the start of the substring.
|
## start: An optional position for the start of the substring.
|
||||||
## end: An optional position for the end of the substring. A value less than zero (such as the default -1)
|
## end: An optional position for the end of the substring. A value less than
|
||||||
## means a search until the end of the string.
|
## zero (such as the default -1) means a search until the end of the
|
||||||
##
|
## string.
|
||||||
## Returns: The position of the substring. Returns -1 if the string wasn't found. Prints an error if the
|
|
||||||
## starting position is after the ending position.
|
|
||||||
##
|
##
|
||||||
|
## Returns: The position of the substring. Returns -1 if the string wasn't
|
||||||
|
## found. Prints an error if the starting position is after the ending
|
||||||
|
## position.
|
||||||
function find_str%(str: string, sub: string, start: count &default=0, end: int &default=-1%) : int
|
function find_str%(str: string, sub: string, start: count &default=0, end: int &default=-1%) : int
|
||||||
%{
|
%{
|
||||||
return zeek::val_mgr->Int(do_find_str(str, sub, start, end, false));
|
return zeek::val_mgr->Int(do_find_str(str, sub, start, end, false));
|
||||||
%}
|
%}
|
||||||
|
|
||||||
## The same as find(), but returns the highest index matching the substring instead of the smallest.
|
## The same as find(), but returns the highest index matching the substring
|
||||||
|
## instead of the smallest.
|
||||||
##
|
##
|
||||||
## str: The string to search in.
|
## str: The string to search in.
|
||||||
## substr: The string to search for.
|
## substr: The string to search for.
|
||||||
## start: An optional position for the start of the substring.
|
## start: An optional position for the start of the substring.
|
||||||
## end: An optional position for the end of the substring. A value less than zero (such as the default -1)
|
## end: An optional position for the end of the substring. A value less than
|
||||||
## means a search from the end of the string.
|
## zero (such as the default -1) means a search from the end of the string.
|
||||||
##
|
|
||||||
## Returns: The position of the substring. Returns -1 if the string wasn't found. Prints an error if the
|
|
||||||
## starting position is after the ending position.
|
|
||||||
##
|
##
|
||||||
|
## Returns: The position of the substring. Returns -1 if the string wasn't
|
||||||
|
## found. Prints an error if the starting position is after the ending
|
||||||
|
## position.
|
||||||
function rfind_str%(str: string, sub: string, start: count &default=0, end: int &default=-1%) : int
|
function rfind_str%(str: string, sub: string, start: count &default=0, end: int &default=-1%) : int
|
||||||
%{
|
%{
|
||||||
return zeek::val_mgr->Int(do_find_str(str, sub, start, end, true));
|
return zeek::val_mgr->Int(do_find_str(str, sub, start, end, true));
|
||||||
|
@ -1311,15 +1314,18 @@ function is_alnum%(str: string%) : bool
|
||||||
return zeek::val_mgr->True();
|
return zeek::val_mgr->True();
|
||||||
%}
|
%}
|
||||||
|
|
||||||
## Returns a left-justified version of the string, padded to a specific length with a specified character.
|
## Returns a left-justified version of the string, padded to a specific length
|
||||||
|
## with a specified character.
|
||||||
##
|
##
|
||||||
## str: The string to left-justify.
|
## str: The string to left-justify.
|
||||||
## count: The length of the returned string. If this value is less than or equal to the length of str, a
|
## count: The length of the returned string. If this value is less than or
|
||||||
## copy of str is returned.
|
## equal to the length of str, a copy of str is returned.
|
||||||
## fill: The character used to fill in any extra characters in the resulting string. If a string longer than
|
## fill: The character used to fill in any extra characters in the resulting
|
||||||
## one character is passed, an error is reported. This defaults to the space character.
|
## string. If a string longer than one character is passed, an error is
|
||||||
|
## reported. This defaults to the space character.
|
||||||
##
|
##
|
||||||
## Returns: A left-justified version of a string, padded with characters to a specific length.
|
## Returns: A left-justified version of a string, padded with characters to a
|
||||||
|
## specific length.
|
||||||
##
|
##
|
||||||
function ljust%(str: string, width: count, fill: string &default=" "%) : string
|
function ljust%(str: string, width: count, fill: string &default=" "%) : string
|
||||||
%{
|
%{
|
||||||
|
@ -1353,15 +1359,18 @@ static zeek::StringValPtr do_rjust(zeek::StringVal* str, uint64_t width, char fi
|
||||||
|
|
||||||
%%}
|
%%}
|
||||||
|
|
||||||
## Returns a right-justified version of the string, padded to a specific length with a specified character.
|
## Returns a right-justified version of the string, padded to a specific length
|
||||||
|
## with a specified character.
|
||||||
##
|
##
|
||||||
## str: The string to right-justify.
|
## str: The string to right-justify.
|
||||||
## count: The length of the returned string. If this value is less than or equal to the length of str, a
|
## count: The length of the returned string. If this value is less than or
|
||||||
## copy of str is returned.
|
## equal to the length of str, a copy of str is returned.
|
||||||
## fill: The character used to fill in any extra characters in the resulting string. If a string longer than
|
## fill: The character used to fill in any extra characters in the resulting
|
||||||
## one character is passed, an error is reported. This defaults to the space character.
|
## string. If a string longer than one character is passed, an error is
|
||||||
|
## reported. This defaults to the space character.
|
||||||
##
|
##
|
||||||
## Returns: A right-justified version of a string, padded with characters to a specific length.
|
## Returns: A right-justified version of a string, padded with characters to a
|
||||||
|
## specific length.
|
||||||
##
|
##
|
||||||
function rjust%(str: string, width: count, fill: string &default=" "%) : string
|
function rjust%(str: string, width: count, fill: string &default=" "%) : string
|
||||||
%{
|
%{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue