src: move pseudo-toplevel methods from Object
[nit.git] / lib / core / text / abstract_text.nit
index 63fb920..01d0eab 100644 (file)
@@ -146,15 +146,7 @@ abstract class Text
        # Returns -1 if not found
        #
        # DEPRECATED : Use self.chars.last_index_of_from instead
-       fun last_index_of_from(item: Char, pos: Int): Int
-       do
-               var iter = self.chars.reverse_iterator_from(pos)
-               while iter.is_ok do
-                       if iter.item == item then return iter.index
-                       iter.next
-               end
-               return -1
-       end
+       fun last_index_of_from(item: Char, pos: Int): Int do return chars.last_index_of_from(item, pos)
 
        # Gets an iterator on the chars of self
        #
@@ -983,9 +975,6 @@ abstract class FlatText
        # if set before using it.
        private var items: NativeString is noinit
 
-       # Real items, used as cache for to_cstring is called
-       private var real_items: nullable NativeString = null
-
        # Returns a char* starting at position `first_byte`
        #
        # WARNING: If you choose to use this service, be careful of the following.