052-string-literal.scm (410B)
1 ; "..." string literals are bytevectors. Basic content + length. 2 (define s "abc") 3 (if (= (bytevector-length s) 3) 0 (sys-exit 1)) 4 (if (= (bytevector-u8-ref s 0) 97) 0 (sys-exit 2)) ; 'a' 5 (if (= (bytevector-u8-ref s 1) 98) 0 (sys-exit 3)) ; 'b' 6 (if (= (bytevector-u8-ref s 2) 99) 0 (sys-exit 4)) ; 'c' 7 ; Empty string is a 0-length bytevector. 8 (if (= (bytevector-length "") 0) 0 (sys-exit 5)) 9 (sys-exit 0)