Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
How to compare two slices for equality?

I remember there was a function equal_slices in stdlib for comparing two slices, but now at compilation time I get an error saying such a function does not exist. Was it removed? How slices should be compared nowadays?


This question was imported from Telegram Chat: https://t.me/tondev/129679

Votes Newest

Answers


Looks like it is removed to force developers to use equal_slice_bits function. This function name is better in that it highlights the fact that only bits are compared and not references.

This is the old definition of both:

;;; Checks whether the data parts of two slices coinside
int equal_slice_bits(slice a, slice b) asm "SDEQ";
int equal_slices(slice a, slice b) asm "SDEQ";

So these were both equal functions.

  
  
Posted 10 months ago
12K Views
1 Answer
10 months ago
10 months ago
Tags