lib/string: document FlatString::with_infos
authorJean Privat <jean@pryen.org>
Mon, 9 Mar 2015 01:37:38 +0000 (08:37 +0700)
committerJean Privat <jean@pryen.org>
Tue, 10 Mar 2015 13:43:26 +0000 (20:43 +0700)
Signed-off-by: Jean Privat <jean@pryen.org>

lib/standard/string.nit

index 88c4074..0b4b1e9 100644 (file)
@@ -1163,10 +1163,14 @@ class FlatString
        #              String Specific Methods           #
        ##################################################
 
-       private init with_infos(items: NativeString, len: Int, from: Int, to: Int)
+       # Low-level creation of a new string with given data.
+       #
+       # `items` will be used as is, without copy, to retrieve the characters of the string.
+       # Aliasing issues is the responsibility of the caller.
+       private init with_infos(items: NativeString, length: Int, from: Int, to: Int)
        do
                self.items = items
-               length = len
+               self.length = length
                index_from = from
                index_to = to
        end