Welcome to the CHICKEN Scheme pasting service

Potential bug in "format" added by zilti 3 days ago

(define content "{\"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"hello\", \"params\": {\"name\": \"World!\"}}")

(display (format "client.scm: sent \"Content-Length: ~a\r\n\r\n~a\""
                 (+ 4 (string-length content)) content))

;; Results in:
;; client.scm: sent "Content-Length: 80
;;

(display (format "client.scm: sent \"Content-Length: ~a\r\n\r\n~a\""
                 (+ 4 (string-length content)) content))

;; Results in:
;; client.scm: sent "Content-Length: 80
;; 
;; {"jsonrpc": "2.0", "id": 1, "method": "hello", "params": {"name": "World!"}}"

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What's the procedure to access a character in a string by index in R5RS?
Visually impaired? Let me spell it for you (wav file) download WAV