lib/string_exp/utf8_no_index: Bytelen now defined in Text
authorLucas Bajolet <r4pass@hotmail.com>
Thu, 7 Aug 2014 16:58:12 +0000 (12:58 -0400)
committerLucas Bajolet <r4pass@hotmail.com>
Thu, 7 Aug 2014 17:01:04 +0000 (13:01 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

lib/string_experimentations/utf8_noindex.nit

index e2cdbd1..fe0fec7 100644 (file)
@@ -176,7 +176,7 @@ redef class FlatString
        redef type OTHER: FlatString
 
        # Length in bytes of the string (e.g. the length of the C string)
-       var bytelen: Int
+       redef var bytelen: Int
 
        redef var length = length_l is lazy
 
@@ -376,6 +376,13 @@ redef class FlatString
        end
 end
 
+redef class Text
+
+       # Length of the string, in bytes
+       fun bytelen: Int is abstract
+
+end
+
 redef class NativeString
 
        redef fun to_s: FlatString