2010/10/21 Joe Python <jopyt...@gmail.com>:
> How to append a newline to a string?
> I wish to do that in memory before I start writing to a file.
> The string function seems to stringify the newline control character as
> follows.
>
> ------------< snip >---------------------------
>
> (apply string '(#\a #\b #\newline)) => "ab\n"
>
> ------------< snip >------------------------------

Your code is perfectly correct; it's just that you want to use
`display` rather than `write` to write out the string, so that you get
its characters rather than a Scheme-level representation of the string
object itself.

_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to