mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
fix ZAM "cat" of doubles/times to include trailing ".0" per normal BiF behavior
This commit is contained in:
parent
86d1812d49
commit
4cafacf90b
5 changed files with 48 additions and 15 deletions
|
@ -571,6 +571,15 @@ std::string json_escape_utf8(const std::string& val, bool escape_printable_contr
|
|||
*/
|
||||
std::string json_escape_utf8(const char* val, size_t val_size, bool escape_printable_controls = true);
|
||||
|
||||
/**
|
||||
* Checks for values that are approximately equal.
|
||||
* @param a first value to compare
|
||||
* @param b second value to compare
|
||||
* @param tolerance how close they need to be to deem them "approximately equal"
|
||||
* @return true if `a` is within the given tolerance of `b`, false otherwise
|
||||
*/
|
||||
bool approx_equal(double a, double b, double tolerance = std::numeric_limits<double>::epsilon());
|
||||
|
||||
/**
|
||||
* Splits a string at all occurrences of a delimiter. Successive occurrences
|
||||
* of the delimiter will be split into multiple pieces.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue