Closed johnynek closed 3 years ago
Hi @johnynek,
Thanks for pointing out the missing documentation. Yes these are supported. Just added to quickstart: 2a22036397c992003742c91f963e6f491a831b3f
To find out the length of a string:
(# s)
To get a character from a string:
(let s str "hello")
(let c int (get s 0)) ;; 'h'==104
To copy part of a string into a new string use
(slice s i n)
the same way asslice
forarr
:
(let s str "hello")
(slice s 1 3) ;; "ell"
The quickstart only mentions appending to strings and comparing strings. It does not mention accessing the length of strings or indexing characters or substrings. Is that supported?