note
	library: "Free implementation of ELKS library"
	status: "See notice at end of class."
	legal: "See notice at end of class."
	date: "$Date: 2017-03-23 19:18:26 +0000 (Thu, 23 Mar 2017) $"
	revision: "$Revision: 100033 $"

class interface
	SEQ_STRING

create 
	make

feature -- Access

	search_after (c: CHARACTER_8)
			-- Move cursor to first position
			-- (at or after current cursor position)
			-- where current_item and c are identical.

	search_before (c: CHARACTER_8)
			-- Move cursor to greatest position at or before cursor
			-- where current_item and c are identical;
			-- go before if unsuccessful.

	search_string_after (s: STRING_8; fuzzy: INTEGER_32)
			-- Move cursor to first position
			-- (at or after cursor position) where `substring
			-- (index, index + s.count)' and s are identical.
			-- Go after if unsuccessful.
			-- The 'fuzzy' parameter is the maximum allowed number
			-- of mismatches within the pattern. A 0 means an exact match.

	search_string_before (s: STRING_8; fuzzy: INTEGER_32)
			-- Move cursor to first position
			-- (at or before cursor position) where `substring
			-- (index, index + s.count)' and s are identical.
			-- Go before if unsuccessful.
			-- The 'fuzzy' parameter is the maximum allowed number
			-- of mismatches within the pattern. A 0 means an exact match.

	current_item: CHARACTER_8
			-- Current item

	index: INTEGER_32
			-- Index of current_item, if valid
			-- Valid values are between 1 and count (if count > 0).

	index_of_occurrence (c: CHARACTER_8; i: INTEGER_32): INTEGER_32
			-- Index of i-th occurrence of c.
			-- 0 if none.
		ensure then
			index_value: (Result = 0) or item (Result) = c

	has (c: CHARACTER_8): BOOLEAN
			-- Does string include c?
	
feature -- Status report

	before: BOOLEAN
			-- Is there no valid cursor position to the left of cursor?

	after: BOOLEAN
			-- Is there no valid cursor position to the right of cursor?
	
feature -- Cursor movement

	start
			-- Move to first position.

	finish
			-- Move to last position.

	back
			-- Move to previous position.

	forth
			-- Move to next position.
	
feature -- Element change

	replace (c: CHARACTER_8)
			-- Replace current item by c.

	share (other: like Current)
			-- Make string share the text of other.
		require
			argument_not_void: other /= Void
		ensure
			shared_index: other.index = index

	precede (c: CHARACTER_8)
			-- Add c at front.
		ensure
			new_index: index = old index + 1

	prepend (s: STRING_8)
			-- Prepend a copy of s at front.
		require
			argument_not_void: s /= Void
		ensure
			new_index: index = old index + s.count
	
feature -- Removal

	prune (c: CHARACTER_8)
			-- Remove first occurrence of c.

	remove_current_item
			-- Remove current item.

	wipe_out
			-- Clear out all characters.
	
feature -- Iteration

	do_all (action: PROCEDURE [CHARACTER_8])
			-- Apply action to every item, from first to last.
			-- Semantics not guaranteed if action changes the structure;
			-- in such a case, apply iterator to clone of structure instead.

	do_if (action: PROCEDURE [CHARACTER_8]; test: FUNCTION [CHARACTER_8, BOOLEAN])
			-- Apply action to every item that satisfies test, from first to last.
			-- Semantics not guaranteed if action or test changes the structure;
			-- in such a case, apply iterator to clone of structure instead.

	there_exists (test: FUNCTION [CHARACTER_8, BOOLEAN]): BOOLEAN
			-- Is test true for at least one item?

	for_all (test: FUNCTION [CHARACTER_8, BOOLEAN]): BOOLEAN
			-- Is test true for all items?
	
feature -- Duplication

	mirrored: like Current
			-- Current string read from right to left.
			-- The result string has the same capacity and the
			-- same current position (i.e. the cursor is pointing
			-- at the same item)
		ensure
			mirrored_index: Result.index = count - index + 1
			same_count: Result.count = count

	mirror
			-- Reverse the characters order.
			-- "Hello world" -> "dlrow olleH".
			-- The current position will be on the same item
			-- as before.
		ensure
			same_count: count = old count
			mirrored_index: index = count - old index + 1
	
note
	copyright: "Copyright (c) 1984-2017, 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 SEQ_STRING

Generated by ISE EiffelStudio