interop

maleghast 2024-08-28T14:39:16.202919Z

Anyone in here got any advice for an Interop n00b (me) on how to use the isISOControl static method on the Java Character class..? I have tried:

(Character/isISOControl char)
(.isISOControl char)
(Character.isISOControl char)
None of which work, albeit with different errors, but I don't get why after all (Integer/parseInt "3") just works :-(

lread 2024-08-28T15:43:28.046919Z

What's not working for you? My little REPL experiment seems to behave as expected:

user=> (Character/isISOControl \u0011)
true
user=> (Character/isISOControl 23)
true
user=> (Character/isISOControl "nope")
Execution error (IllegalArgumentException) at user/eval7 (REPL:1).
No matching method isISOControl found taking 1 args

maleghast 2024-08-28T15:45:53.945979Z

Thanks - I was being a doofus and passing a string rather than a char facepalm

maleghast 2024-08-28T15:49:06.634119Z

I have since fixed it by writing a simple function to do the test on any individual char and then using map on a string.

lread 2024-08-28T16:00:20.482269Z

Ah, we've all been there (maybe me more than others!). I'm glad you're sorted out!

maleghast 2024-08-28T14:49:26.858249Z

(yes I have Googled around a bit, I admit defeat, my Google-Fu is weak)