This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Strings and Characters in Kawa
- From: Jim White <jim at pagesmiths dot com>
- To: Nigel Dolby <nigel_dolby at acm dot org>
- Cc: 'Kawa List' <kawa at sources dot redhat dot com>
- Date: Mon, 30 Jan 2006 10:12:38 -0800
- Subject: Re: Strings and Characters in Kawa
- References: <43DE2EE0.9080100@acm.org>
Nigel Dolby wrote:
...
But if I try to give a Java string to a Scheme function that expects a
string I get a type error.
> ...
The current implementation uses j.l.String for Scheme symbols and a Kawa
type for Scheme strings. So if you are writing Java code to work with
strings you need to convert them to j.l.String first. <String> (as
opposed to <string>) can be used to do that:
http://www.gnu.org/software/kawa/Standard-Types.html
On the plus side Kawa string functions will accept j.l.Strings as
parameters:
(let ((x :: <String> "foo")) (string-append x "bar"))
Jim