src: fix example for String::unescape_nit
authorJean Privat <jean@pryen.org>
Fri, 16 Aug 2013 10:11:58 +0000 (06:11 -0400)
committerJean Privat <jean@pryen.org>
Fri, 16 Aug 2013 10:11:58 +0000 (06:11 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/literal.nit

index b4376a7..f98c209 100644 (file)
@@ -113,10 +113,10 @@ redef class String
        #
        # Example:
        #     var s = "\\n"
-       #     print s.length # -> 2
+       #     assert s.length        ==  2
        #     var u = s.unescape_nit
-       #     print s.length # -> 1
-       #     print s[0].ascii # -> 10 (the ASCII value of the "new line" character)
+       #     assert u.length        ==  1
+       #     assert u[0].ascii      ==  10 # (the ASCII value of the "new line" character)
        fun unescape_nit: String
        do
                var res = new Buffer.with_capacity(self.length)