indexing
description: "Characters, with comparison operations and an ASCII code"
external_name: "System.Char"
assembly: "mscorlib"
library: "Free implementation of ELKS library"
copyright: "Copyright (c) 1986-2005, Eiffel Software and others"
license: "Eiffel Forum License v2 (see forum.txt)"
date: "$Date: 2008-05-23 17:24:07 -0700 (Fri, 23 May 2008) $"
revision: "$Revision: 170 $"
frozen expanded class interface
CHARACTER_8
create
default_create
ANY
make_from_reference (v: CHARACTER_8_REF)
`Current'`v.item'
CHARACTER_8_REF
require CHARACTER_8_REF
v_not_void: v /= Void
ensure CHARACTER_8_REF
item_set: item = v.item
convert
make_from_reference ({CHARACTER_8_REF}),
make_from_reference: {CHARACTER_32}
feature
code: INTEGER_32
ensure CHARACTER_8_REF
code_non_negatif: Result >= 0
code_in_range: Result >= min_value and Result <= max_value
generating_type: STRING_8
ANY
ensure ANY
generating_type_not_void: Result /= Void
generating_type_not_empty: not Result.is_empty
generator: STRING_8
ANY
ensure ANY
generator_not_void: Result /= Void
generator_not_empty: not Result.is_empty
hash_code: INTEGER_32
CHARACTER_8_REF
ensure HASHABLE
good_hash_value: Result >= 0
item: CHARACTER_8
CHARACTER_8_REF
max_value: INTEGER_32 is 255
CHARACTER_8_REF
min_value: INTEGER_32 is 0
CHARACTER_8_REF
natural_32_code: NATURAL_32
CHARACTER_8_REF
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 (other /= Void and then 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))
frozen is_deep_equal (other: CHARACTER_8): BOOLEAN
`Current'`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
shallow_implies_deep: standard_is_equal (other) implies Result
same_type: Result implies same_type (other)
symmetric: Result implies other.is_deep_equal (Current)
is_equal (other: CHARACTER_8): BOOLEAN
`other'
CHARACTER_8_REF
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: CHARACTER_8): CHARACTER_8
`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: CHARACTER_8): CHARACTER_8
`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
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: CHARACTER_8): 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: CHARACTER_8): 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: CHARACTER_8): BOOLEAN
`other'
CHARACTER_8_REF
require PART_COMPARABLE
other_exists: other /= Void
ensure then COMPARABLE
asymmetric: Result implies not (other < Current)
ensure then CHARACTER_8_REF
definition: Result = (code < other.code)
infix "<=" (other: CHARACTER_8): BOOLEAN
`other'
COMPARABLE
require PART_COMPARABLE
other_exists: other /= Void
ensure then COMPARABLE
definition: Result = ((Current < other) or is_equal (other))
infix ">" (other: CHARACTER_8): BOOLEAN
`other'
COMPARABLE
require PART_COMPARABLE
other_exists: other /= Void
ensure then COMPARABLE
definition: Result = (other < Current)
infix ">=" (other: CHARACTER_8): BOOLEAN
`other'
COMPARABLE
require PART_COMPARABLE
other_exists: other /= Void
ensure then COMPARABLE
definition: Result = (other <= Current)
feature
conforms_to (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
is_alpha: BOOLEAN
item
is_upperis_lower
CHARACTER_8_REF
is_alpha_numeric: BOOLEAN
item
CHARACTER_8_REF
is_control: BOOLEAN
item
CHARACTER_8_REF
is_digit: BOOLEAN
item
CHARACTER_8_REF
is_graph: BOOLEAN
item
CHARACTER_8_REF
is_hashable: BOOLEAN
HASHABLE
is_hexa_digit: BOOLEAN
item
CHARACTER_8_REF
is_lower: BOOLEAN
item
CHARACTER_8_REF
is_printable: BOOLEAN
item
CHARACTER_8_REF
is_punctuation: BOOLEAN
item
CHARACTER_8_REF
is_space: BOOLEAN
item
CHARACTER_8_REF
is_upper: BOOLEAN
item
CHARACTER_8_REF
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))
feature
set_item (c: CHARACTER_8)
`c'item
CHARACTER_8_REF
feature
as_lower: CHARACTER_8
item
itemis_upper
CHARACTER_8_REFlower
CHARACTER_8_REF
as_upper: CHARACTER_8
item
itemis_lower
CHARACTER_8_REFupper
CHARACTER_8_REF
lower: CHARACTER_8
item
itemis_upper
CHARACTER_8_REFas_lower
CHARACTER_8_REF
to_character_32: CHARACTER_32
to_character_8: CHARACTER_8
CHARACTER_8_REF
to_reference: CHARACTER_8_REF
CHARACTER_8_REF
ensure CHARACTER_8_REF
to_reference_not_void: Result /= Void
upper: CHARACTER_8
item
itemis_lower
CHARACTER_8_REFas_upper
CHARACTER_8_REF
feature
copy (other: CHARACTER_8)
`other'
ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_equal: is_equal (other)
frozen deep_copy (other: CHARACTER_8)
copy`other'deep_twin
ANY
require ANY
other_not_void: other /= Void
ensure ANY
deep_equal: deep_equal (Current, other)
frozen deep_twin: CHARACTER_8
ANY
ensure ANY
deep_twin_not_void: Result /= Void
deep_equal: deep_equal (Current, Result)
frozen standard_copy (other: CHARACTER_8)
`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: CHARACTER_8
`other'
ANY
ensure ANY
standard_twin_not_void: Result /= Void
equal: standard_equal (Result, Current)
frozen twin: CHARACTER_8
`Current'
twincopycopy
ANY
ensure ANY
twin_not_void: Result /= Void
is_equal: Result.is_equal (Current)
feature
frozen default: CHARACTER_8
ANY
frozen default_pointer: POINTER
`POINTER'
`p'default
`p'`POINTER'
ANY
default_rescue
ANY
frozen do_nothing
ANY
feature
next: CHARACTER_8
CHARACTER_8_REF
require CHARACTER_8_REF
valid_character: (item.code + 1).is_valid_character_8_code
ensure CHARACTER_8_REF
valid_result: Result |-| item = 1
previous: CHARACTER_8
CHARACTER_8_REF
require CHARACTER_8_REF
valid_character: (item.code - 1).is_valid_character_8_code
ensure CHARACTER_8_REF
valid_result: Result |-| item = -1
infix "+" (incr: INTEGER_32): CHARACTER_8
`incr'item
CHARACTER_8_REF
require CHARACTER_8_REF
valid_increment: (item.code + incr).is_valid_character_8_code
ensure CHARACTER_8_REF
valid_result: Result |-| item = incr
infix "-" (decr: INTEGER_32): CHARACTER_8
`decr'item
CHARACTER_8_REF
require CHARACTER_8_REF
valid_decrement: (item.code - decr).is_valid_character_8_code
ensure CHARACTER_8_REF
valid_result: item |-| Result = decr
infix "|-|" (other: CHARACTER_8): INTEGER_32
item`other'
CHARACTER_8_REF
ensure CHARACTER_8_REF
valid_result: other + Result = item
feature
io: STD_FILES
ANY
ensure ANY
io_not_void: Result /= Void
out: STRING_8
CHARACTER_8_REF
ensure ANY
out_not_void: Result /= Void
print (some: ?ANY)
`some'
ANY
frozen tagged_out: STRING_8
ANY
ensure ANY
tagged_out_not_void: Result /= Void
feature
operating_environment: OPERATING_ENVIRONMENT
ANY
ensure ANY
operating_environment_not_void: Result /= Void
invariant
COMPARABLE
irreflexive_comparison: not (Current < Current)
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
end CHARACTER_8