next up previous contents index
Next: Object aggregation Up: Basic data types and Previous: Floating-point numbers

Characters

In character.cecil:


extend char isa ordered_hashable[char]; 
method from_ascii(i@:int):char; 
method from_ascii(i@:int, if_error:&():char):char; 
method ascii_code(c@:char):int;
- convert between characters and integer ASCII codes 
method =(l@:char,r@:char):bool; 
method <(l@:char,r@:char):bool;
method <=(l@:char,r@:char):bool;
method is_lower_case(c@:char):bool; 
method is_upper_case(c@:char):bool; 
method is_letter(c@:char):bool; 
method is_digit(c@:char):bool; 
method is_digit(c@:char, base:int):bool; 
method is_hex_digit(c@:char):bool; 
method is_printable(c@:char):bool; 
method hash(c@:char, range:int):int; 
method as_string(c@:char):string;
- convert to a string of a single character 
method to_lower_case(c@:char):char; 
method to_upper_case(c@:char):char; 
method parse_as_int(c@:char):int; 
method parse_as_int(c@:char, base:int):int; 
method parse_as_int(c@:char, fail@closure:&():int):int; 
method parse_as_int(c@:char, base:int, fail@closure:&():int):int; 
method print_string(c@:char):string; 
   Cecil characters are pretty standard. The parse_as_int methods convert digits (such as '0' ... '9') to integer equivalents.


next up previous contents index
Next: Object aggregation Up: Basic data types and Previous: Floating-point numbers

The Cecil project