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
How do I store a string in FunC?

How do we save an ordinary string in FunC? For example, how do you store the text "A" without making it a slice?

This question was imported from Telegram Chat: https://t.me/tondev_eng/9609

Posted one year ago
Votes Newest

Answers 2

Slices are the way to store strings. At the end of the day, strings are just a bunch of bytes that are interpreted in an ASCII format. You'll have to interpret strings as such when working with them in the smart contract.


You can define strings with quotation marks like in other languages, but they are stored in such a way that they become a slice of bytes.

Posted one year ago
394 × 5 Administrator

You can also store longer strings by creating a linked list of cells, see example here - SnakeCell

Posted one year ago