On Nov 27, 2008, at 11:37 PM, samppi wrote: > user=> (.length "") > 0 > user=> (.isEmpty "") > java.lang.IllegalArgumentException: No matching field found: isEmpty > for class java.lang.String (NO_SOURCE_FILE:0) > > Why does .length, but not .isEmpty, work on Strings?
You're making method calls in the sample you posted. java.lang.String has a "length" method, but no method named "isEmpty". Here is (one version of) a page with docs for java.lang.String: http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html You might also consider these Clojure functions: user=> (count "") 0 user=> (empty? "") true user=> --Steve --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---