Tim Wojtulewicz
012acb17cc
Change to use ToStdStringView() in a few other BIFs
2024-01-23 10:38:56 -07:00
Tim Wojtulewicz
c77f8cc898
Convert remove_prefix/suffix BIFs to use std::string_view
2024-01-23 10:38:56 -07:00
Tim Wojtulewicz
94ad676db0
Rework starts_with BIF similarly to ends_with changes in 1649e3e7cc
2024-01-23 10:38:56 -07:00
Tim Wojtulewicz
b962bd30ce
Squeeze a bit more performance out of the ends_with bif
2024-01-16 12:06:08 -07:00
Tim Wojtulewicz
010306f6f6
Use std::move in return values from bif methods to avoid copies
2024-01-10 12:32:15 -07:00
Arne Welzel
98d9089a8f
strings.bif/do_split_string: Pass bol and eol to MatchPrefix()
...
This allows better control of BOL and EOL. MatchPrefix() / LongestMatch()
always start with BOL.
Closes #3455
2023-11-16 08:36:08 +01:00
Arne Welzel
7a043e5e8f
all: Fix typos identified by typos pre-commit hook
2023-06-13 17:57:32 +02:00
Tim Wojtulewicz
8cf1e51623
Add max_size argument for find_all/find_all_ordered BIFs
2023-02-21 12:27:54 -07:00
Tim Wojtulewicz
797b7657f5
Fix sprintf warnings on macOS
...
The most recent compiler update for macOS marked sprintf as
deprecated, so we started getting warnings from all of the places
that use it.
2023-01-03 12:14:41 -07:00
Josh Soref
cd201aa24e
Spelling src
...
These are non-functional changes.
* accounting
* activation
* actual
* added
* addresult
* aggregable
* aligned
* alternatively
* ambiguous
* analysis
* analyzer
* anticlimactic
* apparently
* application
* appropriate
* arithmetic
* assignment
* assigns
* associated
* authentication
* authoritative
* barrier
* boundary
* broccoli
* buffering
* caching
* called
* canonicalized
* capturing
* certificates
* ciphersuite
* columns
* communication
* comparison
* comparisons
* compilation
* component
* concatenating
* concatenation
* connection
* convenience
* correctly
* corresponding
* could
* counting
* data
* declared
* decryption
* defining
* dependent
* deprecated
* detached
* dictionary
* directional
* directly
* directory
* discarding
* disconnecting
* distinguishes
* documentation
* elsewhere
* emitted
* empty
* endianness
* endpoint
* enumerator
* essentially
* evaluated
* everything
* exactly
* execute
* explicit
* expressions
* facilitates
* fiddling
* filesystem
* flag
* flagged
* for
* fragments
* guarantee
* guaranteed
* happen
* happening
* hemisphere
* identifier
* identifies
* identify
* implementation
* implemented
* implementing
* including
* inconsistency
* indeterminate
* indices
* individual
* information
* initial
* initialization
* initialize
* initialized
* initializes
* instantiate
* instantiated
* instantiates
* interface
* internal
* interpreted
* interpreter
* into
* it
* iterators
* length
* likely
* log
* longer
* mainly
* mark
* maximum
* message
* minimum
* module
* must
* name
* namespace
* necessary
* nonexistent
* not
* notifications
* notifier
* number
* objects
* occurred
* operations
* original
* otherwise
* output
* overridden
* override
* overriding
* overwriting
* ownership
* parameters
* particular
* payload
* persistent
* potential
* precision
* preexisting
* preservation
* preserved
* primarily
* probably
* procedure
* proceed
* process
* processed
* processes
* processing
* propagate
* propagated
* prototype
* provides
* publishing
* purposes
* queue
* reached
* reason
* reassem
* reassemble
* reassembler
* recommend
* record
* reduction
* reference
* regularly
* representation
* request
* reserved
* retrieve
* returning
* separate
* should
* shouldn't
* significant
* signing
* simplified
* simultaneously
* single
* somebody
* sources
* specific
* specification
* specified
* specifies
* specify
* statement
* subdirectories
* succeeded
* successful
* successfully
* supplied
* synchronization
* tag
* temporarily
* terminating
* that
* the
* transmitted
* true
* truncated
* try
* understand
* unescaped
* unforwarding
* unknown
* unknowndata
* unspecified
* update
* usually
* which
* wildcard
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-11-09 12:08:15 -05:00
Arne Welzel
7ed6cbeee5
Make connection$service_violation a set[string]
...
To stay consistent with connection$service.
2022-09-20 23:07:26 +02:00
Arne Welzel
0e28a7faf5
strings: Implement join_string_set() as bif
...
Haven't measured speed, but this is probably faster than
the cat() and string invocations.
2022-09-20 23:07:26 +02:00
Tim Wojtulewicz
ed4521af60
Add type checking to string_cat arguments
2022-08-29 08:45:59 -07:00
Tim Wojtulewicz
4d4c6280e9
Miscellaneous deprecations and renaming
2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
271d3c4038
GH-2054: Allow nulls as separators for join_string_vec
2022-05-25 17:03:26 -07:00
Christian Kreibich
b977e76ad5
The is_num(), is_alpha(), and is_alnum() BiFs now return F on empty string
2022-02-28 13:27:06 -08:00
Christian Kreibich
3324f35cf9
Clarify is_ascii() BiF docstring re behavior on empty strings
2022-02-28 11:23:22 -08:00
Christian Kreibich
4194fdd279
Fix minor indentation bugs in strings.bif
2022-02-28 11:10:08 -08:00
Johanna Amann
d451fb8184
Merge branch 'topic/AbdelSaTd/case-insensitive-find'
...
* topic/AbdelSaTd/case-insensitive-find:
testing-do-find-str_case-insensitive
case-insensitive-search-features-for-do_find_str
I did a few small style-fixes while merging this and expanded the test
a bit. I also removed unecessary commits.
Closes GH-1828
2021-11-10 11:33:47 +00:00
Abdel
82b3606cdd
case-insensitive-search-features-for-do_find_str
2021-11-10 11:25:20 +00:00
Vern Paxson
0118b6ee38
migrate to differentiated vector "At" accessors to support future efficiency
2021-02-25 13:28:23 -08:00
Jon Siwek
1ca85f0221
Merge remote-tracking branch 'origin/topic/timw/deprecation-cleanup'
...
Merge adjustments:
- Removed some stale str_split() references from docs
- Renumbered TypeTag enum comments
- Simplified test-case for @unload (don't need .bro files anymore)
* origin/topic/timw/deprecation-cleanup:
Doc updates
Fix language.init-in-anon-function btest due to changes to log filter predicates
Remove deprecated log filter predicates for 4.1
Remove Plugin::HookCallFunction and fix tests related to it
Remove support for .bro script extension and BRO_ environment variables
Remove deprecated ICMP events
Remove some deprected methods/events from bif files
Remove TYPE_COUNTER
Remove all of the random single-file deprecations
Remove all fully-deprecated files
Update bifcl submodule to remove deprecations from generated code
2021-01-29 16:40:54 -08:00
Tim Wojtulewicz
7292b52f66
Remove some deprected methods/events from bif files
2021-01-27 10:52:40 -07:00
Tim Wojtulewicz
4962986df1
Remove GET_FIELD_AS macro, replace with template methods
2021-01-14 11:58:59 -07:00
Tim Wojtulewicz
a94fcad957
Add templated As() method to Val, use in various places we were using dynamic_cast
2021-01-14 11:58:59 -07:00
Vern Paxson
7f92a573d2
Remove BroValUnion by hoisting underlying Val subclass values into subclasses
2021-01-14 11:58:59 -07:00
Jon Siwek
33a55a04c3
Update documentation for Python >= 3.5 requirement
2020-11-25 14:57:09 -08:00
Tim Wojtulewicz
96d9115360
GH-1079: Use full paths starting with zeek/ when including files
2020-11-12 12:15:26 -07:00
Jon Siwek
d99c5aaf7d
Improve documentation for rfind_str()
2020-09-01 17:54:44 -07:00
Jon Siwek
f6e48c3a18
Reformat strings.bif Zeekygen comments to fix Sphinx warnings
2020-09-01 11:58:52 -07:00
Tim Wojtulewicz
8d2d867a65
Move everything in util.h to zeek::util namespace.
...
This commit includes renaming a number of methods prefixed with bro_ to be prefixed with zeek_.
2020-08-20 16:00:33 -07:00
Jon Siwek
d12edad6a1
Misc strings.bif adjustments
...
* Declare rfind_str() with correct return type
* Fix compiler warnings for signed/unsigned comparisons
2020-08-17 13:53:36 -07:00
Tim Wojtulewicz
5816ea27e9
Fix compiler warning from missing namepsace qualification
2020-08-14 14:01:16 -07:00
Tim Wojtulewicz
b89935107d
Merge remote-tracking branch 'origin/topic/timw/178-string-functions'
...
* origin/topic/timw/178-string-functions:
GH-178: Add new string bif methods based on python string utilities
2020-08-14 10:00:29 -07:00
Jon Siwek
a852ab4c39
Add find_all_ordered() BIF
...
Operates similar to find_all(), except returns a vector instead of
set to allow preservation of order/duplicates.
2020-08-11 11:26:21 -07:00
Tim Wojtulewicz
5d764d6678
GH-178: Add new string bif methods based on python string utilities
2020-08-11 10:40:30 -07:00
Tim Wojtulewicz
bfab224d7c
Move Reporter to zeek namespace
2020-07-31 16:22:41 -04:00
Tim Wojtulewicz
55d699af59
Move BroSubstring to zeek::detail, rename to Substring
2020-07-31 16:22:41 -04:00
Tim Wojtulewicz
c7dc7fc955
Move regex matching code to zeek namespaces
2020-07-31 16:22:39 -04:00
Tim Wojtulewicz
e6871ed3e9
GH-1040: Add zero-indexed version of str_split
2020-07-06 17:05:40 -07:00
Tim Wojtulewicz
736a3f53d4
Rename BroString to zeek::String
2020-07-02 16:15:01 -07:00
Tim Wojtulewicz
86fdf0eaa9
Mark global val_mgr as deprecated and fix uses of it to use namespaced version
2020-07-02 16:15:00 -07:00
Tim Wojtulewicz
58c6e10b62
Move BroString to zeek namespace
2020-06-30 21:12:26 -07:00
Tim Wojtulewicz
d6f1ea16ac
Move Func and associated classes into zeek::detail namespace
2020-06-30 20:51:58 -07:00
Tim Wojtulewicz
64332ca22c
Move all Val classes to the zeek namespaces
2020-06-30 20:48:09 -07:00
Tim Wojtulewicz
ec9eff0bd5
Use type aliases for IntrusivePtr definitions
2020-06-30 20:37:30 -07:00
Tim Wojtulewicz
9364e6a5b7
Move IntrusivePtr and utility methods to the zeek namespace
2020-06-30 20:19:12 -07:00
Tim Wojtulewicz
ed13972924
Move Type types to zeek namespace
2020-06-09 17:20:45 -07:00
Jon Siwek
a384bb8b81
Deprecate VectorVal::Lookup(), replace with At()
2020-05-21 17:03:46 -07:00
Jon Siwek
69533bcbc6
Switch VectorVal BroValUnion to store std::vector<IntrusivePtr<Val>>
...
This changes the return type of AsVector() from std::vector<Val*>*
2020-05-21 16:24:34 -07:00