Lisaac prototype interface

Section Header
+ name := Expanded CHARACTER -> INTEGER_8, CHAR_UNICODE;
- comment := "Static Character library (self is mapping on `char' C).";
- type := `char`;
- default := '\0';
Section Insert
- parent_character_ref:CHARACTER_REF :=
Section Public
- in_range low:CHARACTER to up:CHARACTER :BOOLEAN <-
General :
- object_size:INTEGER :=
- pointer_size:INTEGER := 1;
- maximum:INTEGER :=
- minimum:INTEGER :=
- to_integer:INTEGER <-
Sign-extended conversion.
- code:INTEGER_8 <-
ASCII code of Current.
No Sign-extended conversion.
- to_integer_8:INTEGER_8 <-
Auto-cast.
- to_char_unicode:CHAR_UNICODE <- CHAR_UNICODE.force_conversion Self;
Auto-cast.
- to_uinteger_8:UINTEGER_8 <-
Print.
- print <-
Switch case :
- when value:CHARACTER then block:BLOCK :CHARACTER <-
- when value1:CHARACTER or value2:CHARACTER then block:BLOCK :CHARACTER <-
- when first_value:CHARACTER to last_value:CHARACTER then block:BLOCK :CHARACTER <-
Looping.
- to limit_up:SELF do blc:BLOCK <-
- downto limit_down:SELF do blc:BLOCK <-
- to limit_up:SELF by step:SELF do blc:BLOCK <-
- downto limit_down:SELF by step:SELF do blc:BLOCK <-
Binary operator :
- '+' other:CHARACTER :CHARACTER <-
- '-' other:CHARACTER :CHARACTER <-
- '+#' other:INTEGER :CHARACTER <-
- '!==' other:CHARACTER :BOOLEAN <-
Comparison using `code'.
- '==' Right 60 other:CHARACTER :BOOLEAN <-
Comparison using `code'.
- '<' other:CHARACTER :BOOLEAN <-
Comparison using `code'.
- '<=' other:CHARACTER :BOOLEAN <-
Comparison using `code'.
- '>' other:CHARACTER :BOOLEAN <-
Comparison using `code'.
- '>=' other:CHARACTER :BOOLEAN <-
Comparison using `code'.
- decimal_value:INTEGER <-
Gives the value of a decimal digit.
- binary_value:INTEGER <-
Gives the value of a binary digit.
- octal_value:INTEGER <-
Gives the value of an octal digit.
- hexadecimal_value:INTEGER <-
Gives the value of an hexadecimal digit.
- same_as other:CHARACTER :BOOLEAN <-
Case insensitive comparison.
No difference between upper/lower case letters.
- to_upper:CHARACTER <-
Conversion to the corresponding upper case.
- to_lower:CHARACTER <-
Conversion to the corresponding lower case.
- is_letter:BOOLEAN <-
Is it a letter ('a' .. 'z' or 'A' .. 'Z') ?
- is_digit:BOOLEAN <-
Belongs to '0'..'9'.
- is_binary_digit:BOOLEAN <-
Belongs to '0'..'1'.
- is_octal_digit:BOOLEAN <-
Belongs to '0'..'7'.
- is_hexadecimal_digit:BOOLEAN <-
Is it one character of "0123456789abcdefABCDEF" ?
- is_lower:BOOLEAN <-
Is it some lowercase letter ('a'..'z')?
- is_upper:BOOLEAN <-
Is it some uppercase letter ('A'..'Z')?
- is_separator:BOOLEAN <-
True when character is a separator.
- is_letter_or_digit:BOOLEAN <-
Is it a letter (see `is_letter') or a digit (see `is_digit') ?
- is_ascii:BOOLEAN :=
Is character a 8-bit ASCII character?
- is_bit:BOOLEAN <-
True for `0' and `1'.
- next:CHARACTER <-
Give the next character (the following `code');
- previous:CHARACTER <-
Give the previous character (the `code' before);
Conversions:
- to_hexadecimal:STRING <-
Create a new STRING giving the `code' in hexadecimal.
For example :
(255).to_character.to_hexadecimal gives "FF".
Note: see `to_hexadecimal_in' to save memory.
- to_hexadecimal_in str:STRING <-
Append the equivalent of `to_hexadecimal' at the end of
`str'. Thus you can save memory because no other
STRING is allocate for the job.
Miscellaneous:
- is_alpha:BOOLEAN <-
See `is_letter' (yes this is just a call to `is_letter').
Isn't `is_letter' better English ;-)
Hashing :
- hash_code: INTEGER <-