note description: "External iteration cursor on READABLE_STRING_GENERAL based on CHARACTER_32 item." date: "$Date: 2016-04-16 10:44:12 +0000 (Sat, 16 Apr 2016) $" revision: "$Revision: 98623 $" class interface STRING_ITERATION_CURSOR create make, make_from_substring feature -- Initialization make (t: like target) -- Initialize cursor for target t. require t_attached: t /= Void make_from_substring (t: like target; start_pos, end_pos: INTEGER_32) -- Initialize cursor for target t, with a substring containing all characters at indices -- between start_pos and end_pos. require t_attached: t /= Void start_position_big_enough: start_pos >= 1 end_position_big_enough: start_pos <= end_pos + 1 ensure target_set: target = t starting_index_set: start_index = start_pos target_index_set: target_index = start_index end_index_set: end_index = end_pos feature -- Access item: CHARACTER_32 -- Item at current cursor position. target_index: INTEGER_32 -- Index position of target for current iteration. new_cursor: STRING_ITERATION_CURSOR -- Restarted copy of Current. feature -- Status Report after: BOOLEAN -- Are there no more items to iterate over? feature -- Cursor movement start -- Move to first position. ensure target_index_set_to_one: target_index = start_index forth -- Move to next position. ensure then target_index_advanced: target_index = old target_index + 1 invariant target_attached: target /= Void target_index_big_enough: target_index >= start_index target_index_small_enough: target_index <= end_index + 1 note copyright: "Copyright (c) 1984-2016, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class STRING_ITERATION_CURSOR
Generated by ISE EiffelStudio