indexing
description: "OLE Automation."
legal: "See notice at end of class."
status: "See notice at end of class."
note: "Automatically generated by the EiffelCOM Wizard."
class interface
FONTNAME_ALIAS
create
make (n: INTEGER_32)
`n'
STRING_8
require STRING_8
non_negative_size: n >= 0
ensure STRING_8
empty_string: count = 0
area_allocated: capacity >= n
make_from_string (s: STRING_8)
`s'
STRING_8
require STRING_8
string_exists: s /= Void
ensure STRING_8
not_shared_implementation: Current /= s implies not shared_with (s)
initialized: same_string (s)
make_from_alias (an_alias: STRING_8)
require
non_void_alias: an_alias /= Void
feature
adapt (s: STRING_8): like Current
`s'
`s'
STRING_8
ensure STRING_8
adapt_not_void: Result /= Void
shared_implementation: Result.shared_with (s)
from_c (c_string: POINTER)
`c_string'
STRING_8
require STRING_8
c_string_exists: c_string /= default_pointer
ensure STRING_8
no_zero_byte: not has ('%U')
from_c_substring (c_string: POINTER; start_pos, end_pos: INTEGER_32)
`c_string'
STRING_8
require STRING_8
c_string_exists: c_string /= default_pointer
start_position_big_enough: start_pos >= 1
end_position_big_enough: start_pos <= end_pos + 1
ensure STRING_8
valid_count: count = end_pos - start_pos + 1
make (n: INTEGER_32)
`n'
STRING_8
require STRING_8
non_negative_size: n >= 0
ensure STRING_8
empty_string: count = 0
area_allocated: capacity >= n
make_empty
STRING_8
ensure STRING_8
empty: count = 0
area_allocated: capacity >= 0
make_filled (c: CHARACTER_8; n: INTEGER_32)
`n'`c'
STRING_8
require STRING_8
valid_count: n >= 0
ensure STRING_8
count_set: count = n
area_allocated: capacity >= n
filled: occurrences (c) = count
make_from_c (c_string: POINTER)
`c_string'
STRING_8
require STRING_8
c_string_exists: c_string /= default_pointer
make_from_cil (a_system_string: SYSTEM_STRING)
`a_system_string'
STRING_8
require STRING_8
is_dotnet: {PLATFORM}.is_dotnet
make_from_string (s: STRING_8)
`s'
STRING_8
require STRING_8
string_exists: s /= Void
ensure STRING_8
not_shared_implementation: Current /= s implies not shared_with (s)
initialized: same_string (s)
feature
area: SPECIAL [CHARACTER_8]
TO_SPECIAL
code (i: INTEGER_32): NATURAL_32
`i'
STRING_8
require STRING_GENERAL
valid_index: valid_index (i)
false_constant: STRING_8 is "false"
STRING_8
fuzzy_index (other: STRING_8; start: INTEGER_32; fuzz: INTEGER_32): INTEGER_32
`other'`start'
`fuzz'`other'
STRING_8
require STRING_8
other_exists: other /= Void
other_not_empty: not other.is_empty
start_large_enough: start >= 1
start_small_enough: start <= count
acceptable_fuzzy: fuzz <= other.count
generating_type: STRING_8
ANY
generator: STRING_8
ANY
hash_code: INTEGER_32
STRING_8
ensure HASHABLE
good_hash_value: Result >= 0
index_of (c: CHARACTER_8; start_index: INTEGER_32): INTEGER_32
`c'`start_index'
STRING_8
require STRING_8
start_large_enough: start_index >= 1
start_small_enough: start_index <= count + 1
ensure STRING_8
valid_result: Result = 0 or (start_index <= Result and Result <= count)
zero_if_absent: (Result = 0) = not substring (start_index, count).has (c)
found_if_present: substring (start_index, count).has (c) implies item (Result) = c
none_before: substring (start_index, count).has (c) implies not substring (start_index, Result - 1).has (c)
index_of_code (c: like code; start_index: INTEGER_32): INTEGER_32
`c'`start_index'
STRING_GENERAL
require STRING_GENERAL
start_large_enough: start_index >= 1
start_small_enough: start_index <= count + 1
ensure STRING_GENERAL
valid_result: Result = 0 or (start_index <= Result and Result <= count)
zero_if_absent: (Result = 0) = not substring (start_index, count).has_code (c)
found_if_present: substring (start_index, count).has_code (c) implies code (Result) = c
none_before: substring (start_index, count).has_code (c) implies not substring (start_index, Result - 1).has_code (c)
item (i: INTEGER_32): CHARACTER_8 assign put
`i'
STRING_8infix "@"
STRING_8
require TABLE
valid_key: valid_index (i)
require TO_SPECIAL
valid_index: valid_index (i)
item_code (i: INTEGER_32): INTEGER_32
`i'
STRING_8
require STRING_8
index_small_enough: i <= count
index_large_enough: i > 0
last_index_of (c: CHARACTER_8; start_index_from_end: INTEGER_32): INTEGER_32
`c'
STRING_8
require STRING_8
start_index_small_enough: start_index_from_end <= count
start_index_large_enough: start_index_from_end >= 1
ensure STRING_8
last_index_of_non_negative: Result >= 0
correct_place: Result > 0 implies item (Result) = c
shared_with (other: STRING_8): BOOLEAN
`other'
STRING_8
string: STRING_8
`Current'
STRING_8
ensure STRING_8
string_not_void: Result /= Void
string_type: Result.same_type ("")
first_item: count > 0 implies Result.item (1) = item (1)
recurse: count > 1 implies Result.substring (2, count).is_equal (substring (2, count).string)
substring_index (other: STRING_8; start_index: INTEGER_32): INTEGER_32
STRING_8
require STRING_8
other_not_void: other /= Void
valid_start_index: start_index >= 1 and start_index <= count + 1
ensure STRING_8
valid_result: Result = 0 or else (start_index <= Result and Result <= count - other.count + 1)
zero_if_absent: (Result = 0) = not substring (start_index, count).has_substring (other)
at_this_index: Result >= start_index implies other.same_string (substring (Result, Result + other.count - 1))
none_before: Result > start_index implies not substring (start_index, Result + other.count - 2).has_substring (other)
substring_index_in_bounds (other: STRING_8; start_pos, end_pos: INTEGER_32): INTEGER_32
`other'`start_pos'
`end_pos'
STRING_8
require STRING_8
other_nonvoid: other /= Void
other_notempty: not other.is_empty
start_pos_large_enough: start_pos >= 1
start_pos_small_enough: start_pos <= count
end_pos_large_enough: end_pos >= start_pos
end_pos_small_enough: end_pos <= count
ensure STRING_8
correct_place: Result > 0 implies other.is_equal (substring (Result, Result + other.count - 1))
true_constant: STRING_8 is "true"
STRING_8
infix "@" (i: INTEGER_32): CHARACTER_8 assign put
`i'
STRING_8item
STRING_8
require TABLE
valid_key: valid_index (i)
require TO_SPECIAL
valid_index: valid_index (i)
feature
additional_space: INTEGER_32
RESIZABLE
ensure RESIZABLE
at_least_one: Result >= 1
capacity: INTEGER_32
STRING_8
require BOUNDED
True
require STRING_GENERAL
True
ensure STRING_GENERAL
capacity_non_negative: Result >= 0
count: INTEGER_32
STRING_8
growth_percentage: INTEGER_32 is 50
RESIZABLE
index_set: INTEGER_INTERVAL
STRING_8
require INDEXABLE
True
ensure INDEXABLE
not_void: Result /= Void
ensure then STRING_8
Result.count = count
minimal_increase: INTEGER_32 is 5
RESIZABLE
occurrences (c: CHARACTER_8): INTEGER_32
`c'
STRING_8
require BAG
True
ensure BAG
non_negative_occurrences: Result >= 0
ensure then STRING_8
zero_if_empty: count = 0 implies Result = 0
recurse_if_not_found_at_first_position: (count > 0 and then item (1) /= c) implies Result = substring (2, count).occurrences (c)
recurse_if_found_at_first_position: (count > 0 and then item (1) = c) implies Result = 1 + substring (2, count).occurrences (c)
feature
frozen deep_equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
shallow_implies_deep: standard_equal (some, other) implies Result
both_or_none_void: (some = Void) implies (Result = (other = Void))
same_type: (Result and (some /= Void)) implies some.same_type (other)
symmetric: Result implies deep_equal (other, some)
frozen equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.is_equal (other))
is_case_insensitive_equal (other: like Current): BOOLEAN
`other'
STRING_8
require STRING_8
other_not_void: other /= Void
ensure STRING_8
symmetric: Result implies other.is_case_insensitive_equal (Current)
consistent: standard_is_equal (other) implies Result
valid_result: as_lower.is_equal (other.as_lower) implies Result
is_equal (other: like Current): BOOLEAN
`other'
STRING_8
require ANY
other_not_void: other /= Void
ensure ANY
symmetric: Result implies other.is_equal (Current)
consistent: standard_is_equal (other) implies Result
ensure then COMPARABLE
trichotomy: Result = (not (Current < other) and not (other < Current))
max (other: like Current): like Current
`other'
COMPARABLE
require COMPARABLE
other_exists: other /= Void
ensure COMPARABLE
current_if_not_smaller: Current >= other implies Result = Current
other_if_smaller: Current < other implies Result = other
min (other: like Current): like Current
`other'
COMPARABLE
require COMPARABLE
other_exists: other /= Void
ensure COMPARABLE
current_if_not_greater: Current <= other implies Result = Current
other_if_greater: Current > other implies Result = other
same_string (other: STRING_8): BOOLEAN
`Current'`other'
STRING_8
require STRING_8
other_not_void: other /= Void
ensure STRING_8
definition: Result = string.is_equal (other.string)
frozen standard_equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.standard_is_equal (other))
frozen standard_is_equal (other: like Current): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
same_type: Result implies same_type (other)
symmetric: Result implies other.standard_is_equal (Current)
three_way_comparison (other: like Current): INTEGER_32
`other'
COMPARABLE
require COMPARABLE
other_exists: other /= Void
ensure COMPARABLE
equal_zero: (Result = 0) = is_equal (other)
smaller_negative: (Result = -1) = (Current < other)
greater_positive: (Result = 1) = (Current > other)
infix "<" (other: like Current): BOOLEAN
`other'
STRING_8
require PART_COMPARABLE
other_exists: other /= Void
ensure then COMPARABLE
asymmetric: Result implies not (other < Current)
infix "<=" (other: like Current): BOOLEAN
`other'
COMPARABLE
require PART_COMPARABLE
other_exists: other /= Void
ensure then COMPARABLE
definition: Result = ((Current < other) or is_equal (other))
infix ">" (other: like Current): BOOLEAN
`other'
COMPARABLE
require PART_COMPARABLE
other_exists: other /= Void
ensure then COMPARABLE
definition: Result = (other < Current)
infix ">=" (other: like Current): BOOLEAN
`other'
COMPARABLE
require PART_COMPARABLE
other_exists: other /= Void
ensure then COMPARABLE
definition: Result = (other <= Current)
feature
changeable_comparison_criterion: BOOLEAN is False
STRING_8
conforms_to (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
extendible: BOOLEAN is True
STRING_8
full: BOOLEAN
BOUNDED
has (c: CHARACTER_8): BOOLEAN
`c'
STRING_8
require CONTAINER
True
ensure CONTAINER
not_found_in_empty: Result implies not is_empty
ensure then STRING_8
false_if_empty: count = 0 implies not Result
true_if_first: count > 0 and then item (1) = c implies Result
recurse: (count > 0 and then item (1) /= c) implies (Result = substring (2, count).has (c))
has_code (c: like code): BOOLEAN
`c'
STRING_GENERAL
ensure then STRING_GENERAL
false_if_empty: count = 0 implies not Result
true_if_first: count > 0 and then code (1) = c implies Result
recurse: (count > 0 and then code (1) /= c) implies (Result = substring (2, count).has_code (c))
has_substring (other: STRING_8): BOOLEAN
`Current'`other'
STRING_8
require STRING_8
other_not_void: other /= Void
ensure STRING_8
false_if_too_small: count < other.count implies not Result
true_if_initial: (count >= other.count and then other.same_string (substring (1, other.count))) implies Result
recurse: (count >= other.count and then not other.same_string (substring (1, other.count))) implies (Result = substring (2, count).has_substring (other))
is_boolean: BOOLEAN
`Current'
STRING_8
ensure STRING_8
is_boolean: Result = (true_constant.same_string (as_lower) or false_constant.same_string (as_lower))
is_double: BOOLEAN
`Current'
STRING_8
is_empty: BOOLEAN
FINITE
require CONTAINER
True
require STRING_GENERAL
True
is_hashable: BOOLEAN
HASHABLE
ensure HASHABLE
ok_if_not_default: Result implies (Current /= default)
is_inserted (v: CHARACTER_8): BOOLEAN
`v'
`has (v)'
COLLECTION
is_integer: BOOLEAN
`Current'
STRING_8is_integer_32
STRING_8
is_integer_16: BOOLEAN
`Current'
STRING_8
is_integer_32: BOOLEAN
`Current'
STRING_8is_integer
STRING_8
is_integer_64: BOOLEAN
`Current'
STRING_8
is_integer_8: BOOLEAN
`Current'
STRING_8
is_natural: BOOLEAN
`Current'
STRING_8is_natural_32
STRING_8
is_natural_16: BOOLEAN
`Current'
STRING_8
is_natural_32: BOOLEAN
`Current'
STRING_8is_natural
STRING_8
is_natural_64: BOOLEAN
`Current'
STRING_8
is_natural_8: BOOLEAN
`Current'
STRING_8
is_number_sequence: BOOLEAN
`Current'
STRING_8
is_real: BOOLEAN
`Current'
STRING_8
is_string_32: BOOLEAN is False
STRING_8
is_string_8: BOOLEAN is True
STRING_8
is_valid_as_string_8: BOOLEAN is True
`Current'
STRING_8
object_comparison: BOOLEAN
equal`='
`='
CONTAINER
prunable: BOOLEAN
STRING_8
resizable: BOOLEAN
capacity
RESIZABLE
same_type (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
definition: Result = (conforms_to (other) and other.conforms_to (Current))
valid_code (v: NATURAL_32): BOOLEAN
`v'
STRING_8
valid_index (i: INTEGER_32): BOOLEAN
`i'
STRING_8
require TABLE
True
require STRING_GENERAL
True
require TO_SPECIAL
True
ensure then INDEXABLE
only_if_in_index_set: Result implies ((i >= index_set.lower) and (i <= index_set.upper))
feature
compare_objects
equal
`='
CONTAINER
require CONTAINER
changeable_comparison_criterion: changeable_comparison_criterion
ensure CONTAINER
object_comparison
compare_references
`='
equal
CONTAINER
require CONTAINER
changeable_comparison_criterion: changeable_comparison_criterion
ensure CONTAINER
reference_comparison: not object_comparison
feature
append (s: STRING_8)
`s'
STRING_8
require STRING_8
argument_not_void: s /= Void
ensure STRING_8
new_count: count = old count + old s.count
appended: elks_checking implies is_equal (old twin + old s.twin)
append_boolean (b: BOOLEAN)
`b'
STRING_8
append_character (c: CHARACTER_8)
`c'
STRING_8extend
STRING_8
ensure then STRING_8
item_inserted: item (count) = c
new_count: count = old count + 1
stable_before: elks_checking implies substring (1, count - 1).is_equal (old twin)
append_code (c: like code)
`c'
STRING_GENERAL
require STRING_GENERAL
valid_code: valid_code (c)
ensure then STRING_GENERAL
item_inserted: code (count) = c
new_count: count = old count + 1
stable_before: elks_checking implies substring (1, count - 1).is_equal (old twin)
append_double (d: REAL_64)
`d'
STRING_8
append_integer (i: INTEGER_32)
`i'
STRING_8
append_real (r: REAL_32)
`r'
STRING_8
append_string (s: STRING_8)
`s'
STRING_8
ensure STRING_8
appended: s /= Void implies (elks_checking implies is_equal (old twin + old s.twin))
append_string_general (s: STRING_GENERAL)
`s'
STRING_8
require STRING_GENERAL
argument_not_void: s /= Void
compatible_strings: is_string_8 implies s.is_valid_as_string_8
ensure STRING_GENERAL
new_count: count = old count + old s.count
appended: elks_checking implies to_string_32.is_equal (old to_string_32.twin + old s.to_string_32.twin)
copy (other: like Current)
`other'
twin
STRING_8
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_equal: is_equal (other)
ensure then STRING_8
new_result_count: count = other.count
extend (c: CHARACTER_8)
`c'
STRING_8append_character
STRING_8
require COLLECTION
extendible: extendible
ensure COLLECTION
item_inserted: is_inserted (c)
ensure then BAG
one_more_occurrence: occurrences (c) = old (occurrences (c)) + 1
ensure then STRING_8
item_inserted: item (count) = c
new_count: count = old count + 1
stable_before: elks_checking implies substring (1, count - 1).is_equal (old twin)
fill (other: CONTAINER [CHARACTER_8])
`other'
`other'
COLLECTION
require COLLECTION
other_not_void: other /= Void
extendible: extendible
fill_blank
capacity
STRING_8
ensure STRING_8
filled: full
same_size: (count = capacity) and (capacity = old capacity)
fill_character (c: CHARACTER_8)
capacity`c'
STRING_8
ensure STRING_8
filled: full
same_size: (count = capacity) and (capacity = old capacity)
fill_with (c: CHARACTER_8)
`c'
STRING_8
ensure STRING_8
same_count: (count = old count) and (capacity >= old capacity)
filled: elks_checking implies occurrences (c) = count
insert_character (c: CHARACTER_8; i: INTEGER_32)
`c'`i'
`i'count
STRING_8
require STRING_8
valid_insertion_index: 1 <= i and i <= count + 1
ensure STRING_8
one_more_character: count = old count + 1
inserted: item (i) = c
stable_before_i: elks_checking implies substring (1, i - 1).is_equal (old substring (1, i - 1))
stable_after_i: elks_checking implies substring (i + 1, count).is_equal (old substring (i, count))
insert_string (s: STRING_8; i: INTEGER_32)
`s'`i'
`i'count
STRING_8
require STRING_8
string_exists: s /= Void
valid_insertion_index: 1 <= i and i <= count + 1
ensure STRING_8
inserted: elks_checking implies (is_equal (old substring (1, i - 1) + old (s.twin) + old substring (i, count)))
keep_head (n: INTEGER_32)
`n'
`n'count
STRING_8
require STRING_8
non_negative_argument: n >= 0
ensure STRING_8
new_count: count = n.min (old count)
kept: elks_checking implies is_equal (old substring (1, n.min (count)))
keep_tail (n: INTEGER_32)
`n'
`n'count
STRING_8
require STRING_8
non_negative_argument: n >= 0
ensure STRING_8
new_count: count = n.min (old count)
kept: elks_checking implies is_equal (old substring (count - n.min (count) + 1, count))
left_adjust
STRING_8
ensure STRING_8
valid_count: count <= old count
new_count: not is_empty implies not item (1).is_space
kept: elks_checking implies is_equal ((old twin).substring (old count - count + 1, old count))
precede (c: CHARACTER_8)
`c'
STRING_8prepend_character
STRING_8
ensure STRING_8
new_count: count = old count + 1
prepend (s: STRING_8)
`s'
STRING_8
require STRING_8
argument_not_void: s /= Void
ensure STRING_8
new_count: count = old (count + s.count)
inserted: elks_checking implies string.is_equal (old (s.twin) + old substring (1, count))
prepend_boolean (b: BOOLEAN)
`b'
STRING_8
prepend_character (c: CHARACTER_8)
`c'
STRING_8precede
STRING_8
ensure STRING_8
new_count: count = old count + 1
prepend_double (d: REAL_64)
`d'
STRING_8
prepend_integer (i: INTEGER_32)
`i'
STRING_8
prepend_real (r: REAL_32)
`r'
STRING_8
prepend_string (s: STRING_8)
`s'
STRING_8
put (c: CHARACTER_8; i: INTEGER_32)
`i'`c'
STRING_8
require TABLE
valid_key: valid_index (i)
require TO_SPECIAL
valid_index: valid_index (i)
ensure then INDEXABLE
insertion_done: item (i) = c
ensure TO_SPECIAL
inserted: item (i) = c
ensure then STRING_8
stable_count: count = old count
stable_before_i: elks_checking implies substring (1, i - 1).is_equal (old substring (1, i - 1))
stable_after_i: elks_checking implies substring (i + 1, count).is_equal (old substring (i + 1, count))
put_code (v: NATURAL_32; i: INTEGER_32)
`i'`v'
STRING_8
require STRING_GENERAL
valid_code: valid_code (v)
valid_index: valid_index (i)
ensure STRING_GENERAL
inserted: code (i) = v
stable_count: count = old count
stable_before_i: elks_checking implies substring (1, i - 1).is_equal (old substring (1, i - 1))
stable_after_i: elks_checking implies substring (i + 1, count).is_equal (old substring (i + 1, count))
replace_blank
STRING_8
ensure STRING_8
same_size: (count = old count) and (capacity >= old capacity)
all_blank: elks_checking implies occurrences (' ') = count
replace_substring (s: STRING_8; start_index, end_index: INTEGER_32)
`start_index'`end_index'`s'
STRING_8
require STRING_8
string_not_void: s /= Void
valid_start_index: 1 <= start_index
valid_end_index: end_index <= count
meaningfull_interval: start_index <= end_index + 1
ensure STRING_8
new_count: count = old count + old s.count - end_index + start_index - 1
replaced: elks_checking implies (is_equal (old (substring (1, start_index - 1) + s + substring (end_index + 1, count))))
replace_substring_all (original, new: like Current)
`original'`new'
STRING_8
require STRING_8
original_exists: original /= Void
new_exists: new /= Void
original_not_empty: not original.is_empty
right_adjust
STRING_8
ensure STRING_8
valid_count: count <= old count
new_count: (count /= 0) implies ((item (count) /= ' ') and (item (count) /= '%T') and (item (count) /= '%R') and (item (count) /= '%N'))
kept: elks_checking implies is_equal ((old twin).substring (1, count))
set (t: like Current; n1, n2: INTEGER_32)
`t'`n1'
`n2'
STRING_8
require STRING_8
argument_not_void: t /= Void
ensure STRING_8
is_substring: is_equal (t.substring (n1, n2))
share (other: STRING_8)
`other'
`other'
STRING_8
require STRING_8
argument_not_void: other /= Void
ensure STRING_8
shared_count: other.count = count
shared_area: other.area = area
subcopy (other: like Current; start_pos, end_pos, index_pos: INTEGER_32)
`other'`start_pos'
`end_pos'`index_pos'
STRING_8
require STRING_8
other_not_void: other /= Void
valid_start_pos: other.valid_index (start_pos)
valid_end_pos: other.valid_index (end_pos)
valid_bounds: (start_pos <= end_pos) or (start_pos = end_pos + 1)
valid_index_pos: valid_index (index_pos)
enough_space: (count - index_pos) >= (end_pos - start_pos)
ensure STRING_8
same_count: count = old count
copied: elks_checking implies (is_equal (old substring (1, index_pos - 1) + old other.substring (start_pos, end_pos) + old substring (index_pos + (end_pos - start_pos + 1), count)))
infix "+" (s: STRING_8): like Current
STRING_8
require STRING_8
argument_not_void: s /= Void
ensure STRING_8
result_exists: Result /= Void
new_count: Result.count = count + s.count
initial: elks_checking implies Result.substring (1, count).is_equal (Current)
final: elks_checking implies Result.substring (count + 1, count + s.count).same_string (s)
feature
clear_all
STRING_8
ensure STRING_8
is_empty: count = 0
same_capacity: capacity = old capacity
prune (c: CHARACTER_8)
`c'
STRING_8
require COLLECTION
prunable: prunable
require else STRING_8
True
prune_all (c: CHARACTER_8)
`c'
STRING_8
require COLLECTION
prunable: prunable
require else STRING_8
True
ensure COLLECTION
no_more_occurrences: not has (c)
ensure then STRING_8
changed_count: count = (old count) - (old occurrences (c))
prune_all_leading (c: CHARACTER_8)
`c'
STRING_8
prune_all_trailing (c: CHARACTER_8)
`c'
STRING_8
remove (i: INTEGER_32)
`i'
STRING_8
require STRING_GENERAL
valid_index: valid_index (i)
ensure STRING_GENERAL
new_count: count = old count - 1
removed: elks_checking implies to_string_32.is_equal (old substring (1, i - 1).to_string_32 + old substring (i + 1, count).to_string_32)
remove_head (n: INTEGER_32)
`n'
`n'count
STRING_8
require STRING_8
n_non_negative: n >= 0
ensure STRING_8
removed: elks_checking implies is_equal (old substring (n.min (count) + 1, count))
remove_substring (start_index, end_index: INTEGER_32)
`start_index'
`end_index'
STRING_8
require STRING_8
valid_start_index: 1 <= start_index
valid_end_index: end_index <= count
meaningful_interval: start_index <= end_index + 1
ensure STRING_8
removed: elks_checking implies is_equal (old substring (1, start_index - 1) + old substring (end_index + 1, count))
remove_tail (n: INTEGER_32)
`n'
`n'count
STRING_8
require STRING_8
n_non_negative: n >= 0
ensure STRING_8
removed: elks_checking implies is_equal (old substring (1, count - n.min (count)))
wipe_out
STRING_8
require COLLECTION
prunable: prunable
ensure COLLECTION
wiped_out: is_empty
ensure then STRING_8
is_empty: count = 0
empty_capacity: capacity = 0
feature
adapt_size
count
STRING_8
automatic_grow
Growth_percentage
RESIZABLE
ensure RESIZABLE
increased_capacity: capacity >= old capacity + old capacity * growth_percentage // 100
grow (newsize: INTEGER_32)
`newsize'
STRING_8
ensure RESIZABLE
new_capacity: capacity >= newsize
resize (newsize: INTEGER_32)
`newsize'
STRING_8
require STRING_GENERAL
new_size_non_negative: newsize >= 0
feature
as_lower: like Current
STRING_8
ensure STRING_8
length: Result.count = count
anchor: count > 0 implies Result.item (1) = item (1).as_lower
recurse: count > 1 implies Result.substring (2, count).is_equal (substring (2, count).as_lower)
as_string_32: STRING_32
`Current'
STRING_GENERALto_string_32
STRING_GENERAL
ensure STRING_GENERAL
as_string_32_not_void: Result /= Void
identity: (is_string_32 and Result = Current) or (not is_string_32 and Result /= Current)
as_string_8: STRING_8
`Current'`Current'
STRING_GENERAL
ensure STRING_GENERAL
as_string_8_not_void: Result /= Void
identity: (is_string_8 and Result = Current) or (not is_string_8 and Result /= Current)
as_upper: like Current
STRING_8
ensure STRING_8
length: Result.count = count
anchor: count > 0 implies Result.item (1) = item (1).as_upper
recurse: count > 1 implies Result.substring (2, count).is_equal (substring (2, count).as_upper)
center_justify
count
STRING_8
character_justify (pivot: CHARACTER_8; position: INTEGER_32)
`pivot'
`position'
STRING_8
require STRING_8
valid_position: position <= capacity
positive_position: position >= 1
pivot_not_space: pivot /= ' '
not_empty: not is_empty
left_justify
count
STRING_8
linear_representation: LINEAR [CHARACTER_8]
STRING_8
mirror
STRING_8
ensure STRING_8
same_count: count = old count
mirrored: like Current
STRING_8
ensure STRING_8
same_count: Result.count = count
right_justify
count
STRING_8
ensure STRING_8
same_count: count = old count
split (a_separator: CHARACTER_8): LIST [STRING_8]
`a_separator'
STRING_8
ensure STRING_8
Result /= Void
to_boolean: BOOLEAN
`True'`False'
STRING_8
require STRING_8
is_boolean: is_boolean
ensure STRING_8
to_boolean: (Result = true_constant.same_string (as_lower)) or (not Result = false_constant.same_string (as_lower))
frozen to_c: ANY
STRING_8
require STRING_8
not_is_dotnet: not {PLATFORM}.is_dotnet
frozen to_cil: SYSTEM_STRING
`1'count
STRING_GENERAL
require STRING_GENERAL
is_dotnet: {PLATFORM}.is_dotnet
ensure STRING_GENERAL
to_cil_not_void: Result /= Void
to_double: REAL_64
STRING_8
require STRING_8
represents_a_double: is_double
to_integer: INTEGER_32
STRING_8to_integer_32
STRING_8
require STRING_8
is_integer: is_integer_32
to_integer_16: INTEGER_16
STRING_8
require STRING_8
is_integer_16: is_integer_16
to_integer_32: INTEGER_32
STRING_8to_integer
STRING_8
require STRING_8
is_integer: is_integer_32
to_integer_64: INTEGER_64
STRING_8
require STRING_8
is_integer_64: is_integer_64
to_integer_8: INTEGER_8
STRING_8
require STRING_8
is_integer_8: is_integer_8
to_lower
STRING_8
ensure STRING_8
length_end_content: elks_checking implies is_equal (old as_lower)
to_natural: NATURAL_32
STRING_8to_natural_32
STRING_8
require STRING_8
is_natural: is_natural
to_natural_16: NATURAL_16
STRING_8
require STRING_8
is_natural_16: is_natural_16
to_natural_32: NATURAL_32
STRING_8to_natural
STRING_8
require STRING_8
is_natural: is_natural
to_natural_64: NATURAL_64
STRING_8
require STRING_8
is_natural_64: is_natural_64
to_natural_8: NATURAL_8
STRING_8
require STRING_8
is_natural_8: is_natural_8
to_real: REAL_32
STRING_8
require STRING_8
represents_a_real: is_real
to_string_32: STRING_32
`Current'
STRING_GENERALas_string_32
STRING_GENERAL
ensure STRING_GENERAL
as_string_32_not_void: Result /= Void
identity: (is_string_32 and Result = Current) or (not is_string_32 and Result /= Current)
to_string_8: STRING_8
`Current'
STRING_GENERAL
require STRING_GENERAL
is_valid_as_string_8: is_valid_as_string_8
ensure STRING_GENERAL
as_string_8_not_void: Result /= Void
identity: (is_string_8 and Result = Current) or (not is_string_8 and Result /= Current)
to_upper
STRING_8
ensure STRING_8
length_end_content: elks_checking implies is_equal (old as_upper)
feature
frozen deep_copy (other: like Current)
copy`other'deep_twin
ANY
require ANY
other_not_void: other /= Void
ensure ANY
deep_equal: deep_equal (Current, other)
frozen deep_twin: like Current
ANY
ensure ANY
deep_equal: deep_equal (Current, Result)
multiply (n: INTEGER_32)
STRING_8
require STRING_8
meaningful_multiplier: n >= 1
frozen standard_copy (other: like Current)
`other'
ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_standard_equal: standard_is_equal (other)
frozen standard_twin: like Current
`other'
ANY
ensure ANY
standard_twin_not_void: Result /= Void
equal: standard_equal (Result, Current)
substring (start_index, end_index: INTEGER_32): like Current
`start_index'`end_index'
STRING_8
require STRING_GENERAL
True
ensure STRING_GENERAL
substring_not_void: Result /= Void
substring_count: Result.count = end_index - start_index + 1 or Result.count = 0
first_item: Result.count > 0 implies Result.code (1) = code (start_index)
recurse: Result.count > 0 implies Result.substring (2, Result.count).is_equal (substring (start_index + 1, end_index))
ensure then STRING_8
first_item: Result.count > 0 implies Result.item (1) = item (start_index)
recurse: Result.count > 0 implies Result.substring (2, Result.count).is_equal (substring (start_index + 1, end_index))
frozen twin: like Current
`Current'
twincopycopy
ANY
ensure ANY
twin_not_void: Result /= Void
is_equal: Result.is_equal (Current)
feature
frozen default: like Current
ANY
frozen default_pointer: POINTER
`POINTER'
`p'default
`p'`POINTER'
ANY
default_rescue
ANY
frozen do_nothing
ANY
feature
mismatch_information: MISMATCH_INFORMATION
MISMATCH_CORRECTOR
feature
io: STD_FILES
ANY
out: STRING_8
STRING_8
require ANY
True
ensure then STRING_8
out_not_void: Result /= Void
same_items: same_type ("") implies Result.same_string (Current)
print (some: ANY)
`some'
ANY
frozen tagged_out: STRING_8
ANYout
ANY
feature
operating_environment: OPERATING_ENVIRONMENT
ANY
invariant
STRING_8
extendible: extendible
compare_character: not object_comparison
index_set_has_same_count: index_set.count = count
area_not_void: area /= Void
COMPARABLE
irreflexive_comparison: not (Current < Current)
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
INDEXABLE
index_set_not_void: index_set /= Void
RESIZABLE
increase_by_at_least_one: minimal_increase >= 1
BOUNDED
valid_count: count <= capacity
full_definition: full = (count = capacity)
FINITE
empty_definition: is_empty = (count = 0)
non_negative_count: count >= 0
indexing
copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end FONTNAME_ALIAS