INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Advanced string processing"
project: "Visual Eiffel Library"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: gargs
class ADVANCED_STRING
feature -- Access

chars_index (str1, str2: STRING; start: INTEGER): INTEGER
-- Position of first occurrence of any character from 'str2' in 'str1'
-- at or after 'start' from 'str1'.
-- Returns 0 if the two string arguments have no characters in common.
require
valid_str1: not_empty (str1)
valid_str2: not_empty (str2)
valid_start: start > 0 and start <= str1.count

last_index (s: STRING; c: CHARACTER): INTEGER
-- Position of last occurence of 'c' in string 's'; 0 if none.
require
non_void_string: s /= void

sign_index (input: STRING; c: CHARACTER; start: INTEGER): INTEGER
-- Position of first occurrence of 'c' in 'input' at or after 'start'
-- (but not within the string "..." !); 0 if none.
require
valid_input: not_empty (input)
valid_start: start > 0 and start <= input.count
ensure
non_negative_result: Result >= 0
feature -- Conversion

to_tokens (input, delimiters: STRING): ARRAY [STRING]
-- Converts the 'input' to array of tokens; Void if none.
-- It examines any character from 'delimiters' as token delimiters.
require
valid_input: not_empty (input)
valid_delimiters: not_empty (delimiters)
feature -- Validations

not_empty (s: STRING): BOOLEAN
-- Is 's' non Void and not empty ?
end -- class ADVANCED_STRING

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES