2
How to concatenate strings in FunC?
The string type in FunC is represented by slice, so you need to create new cell and put substrings in it:
slice charA = "A"; ;; char A
slice charB = "B"; ;; char b
;; create cell with "ABBA" string in it
cell cellABBA =
begin_cell()
.store_slice(charA)
.store_slice(charB)
.store_slice(charB)
.store_slice(charA)
.end_cell();
;; convert cell to slice (or simply use the cell itself)
slice stringABBA = cellABBA.begin_parse();
~strdump(s...
one year ago