problem with Character/isLetter

462 views
Skip to first unread message

AJ Sterman

unread,
Jun 6, 2010, 6:50:58 PM6/6/10
to Clojure
(Character/isLetter "x")
#<CompilerException java.lang.IllegalArgumentException: No matching
method found: isLetter (NO_SOURCE_FILE:79)>

i tried a few "use ' " and there was no avail

Thank you for trying to help

Moritz Ulrich

unread,
Jun 7, 2010, 7:17:56 AM6/7/10
to clo...@googlegroups.com
isLetter accepts single characters, you gave it a string with a length of one.
The error is caused by reflection when clojure searches for a function
with the signature isLetter(String)

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

.Bill Smith

unread,
Jun 7, 2010, 10:50:32 AM6/7/10
to Clojure
To complete the thought,

user=> (Character/isLetter \x)
true
user=> (Character/isLetter (.charAt "x" 0))
true

Michael Wood

unread,
Jun 7, 2010, 1:56:03 PM6/7/10
to clo...@googlegroups.com
On 7 June 2010 16:50, .Bill Smith <william...@gmail.com> wrote:
> To complete the thought,
>
> user=> (Character/isLetter \x)
> true
> user=> (Character/isLetter (.charAt "x" 0))
> true

or:

user=> (first "x")
\x
user=> (Character/isLetter (first "x"))
true

> On Jun 7, 6:17 am, Moritz Ulrich <ulrich.mor...@googlemail.com> wrote:
>> isLetter accepts single characters, you gave it a string with a length of one.
>> The error is caused by reflection when clojure searches for a function
>> with the signature isLetter(String)

--
Michael Wood <esio...@gmail.com>

Reply all
Reply to author
Forward
0 new messages