X-Git-Url: http://nitlanguage.org diff --git a/lib/standard/string.nit b/lib/standard/string.nit index d61b260..bcd0445 100644 --- a/lib/standard/string.nit +++ b/lib/standard/string.nit @@ -398,20 +398,25 @@ redef class Object # User redeable representation of `self'. fun to_s: String do return inspect + # The class name of the object in NativeString format. + private fun native_class_name: NativeString is intern + + # The class name of the object. + # FIXME: real type information is not available at runtime. Therefore, for instance, an instance of List[Bool] has just "List" for classname + fun class_name: String do return new String.from_cstring(native_class_name) + # Developper readable representation of `self'. # Usualy, it uses the form "" fun inspect: String do - var r = inspect_head - # r.add('>') - return r + return "<{inspect_head}>" end - # Return "