LisaacTM Platform

CHARACTER


Static Character library (self is mapping on `char' C).
Inherit/Insert Summary
parent_character_ref No developed.
 
Slot Summary
in_range to
Return true if self is in range [lower..upper]
 
General :
object_size
maximum
minimum
to_integer
Sign-extended conversion.
code
ASCII code of Current. No Sign-extended conversion. ASCII code of Current
to_integer_8
Auto-cast.
to_uinteger_8
 
Print.
print
 
Switch case :
when then
when or then
when to then
 
Looping.
to do
downto do
to by do
downto by do
 
Binary operator :
Infix '+'
Infix '-'
Infix '-!'
Infix '+#'
Infix '-#'
Infix '<>'
An other difference syntax (Pascal like)
Infix '<'
Comparison using code. Is self strictly less than other?
Infix '<='
Comparison using code. Is self less than or equal other?
Infix '>'
Comparison using code. Is self strictly greater than other?
Infix '>='
Comparison using code. Is self greater than or equal than other?
decimal_value
Gives the value of a decimal digit.
binary_value
Gives the value of a binary digit.
octal_value
Gives the value of an octal digit.
hexadecimal_value
Gives the value of an hexadecimal digit.
same_as
Case insensitive comparison. No difference between upper/lower case letters.
to_upper
Conversion to the corresponding upper case.
to_lower
Conversion to the corresponding lower case. Conversion of Current to lower case
is_letter
Is it a letter ('a' .. 'z' or 'A' .. 'Z') ?
is_digit
Belongs to '0'..'9'.
is_binary_digit
Belongs to '0'..'1'.
is_octal_digit
Belongs to '0'..'7'.
is_hexadecimal_digit
Is it one character of "0123456789abcdefABCDEF" ?
is_lower
Is it some lowercase letter ('a'..'z')?
is_upper
Is it some uppercase letter ('A'..'Z')?
is_separator
True when character is a separator (' ', '\t', '\n', '\r', '\0', '\f', '\v')?
is_letter_or_digit
Is it a letter (see is_letter) or a digit (see is_digit) ?
is_identifier
Is it a letter or a digit or '_' ?
is_ascii
Is character a 8-bit ASCII character?
is_bit
True for 0 and 1.
next
Give the next character (the following code);
previous
Give the previous character (the code before);
 
Conversions:
to_string
Create a new STRING containing only this character.
to_string_in
Append this character at the end of 'str'. Thus you can save memory because no other STRING is allocated for the job.
to_hexadecimal
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
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
See is_letter (yes this is just a call to is_letter). Isn't is_letter better English ;-)
 
Hashing :
hash_code
The hash-code value of Current.
 

Inherit/Insert Detail

parent_character_ref

.../base/string/character.li line #16

Section:
Insert

Profile:
- SelfSELFparent_character_ref : CHARACTER_REF

Detail slot

in_range to

.../base/string/character.li line #20

Section:
Public

Profile:
- SelfSELFin_range   lower : SELF  to   upper : SELFBOOLEAN

Description:
Return true if self is in range [lower..upper]

General :

object_size

.../base/string/character.li line #26

Section:
Public

Profile:
- SelfSELFobject_size : INTEGER

maximum

.../base/string/character.li line #28

Section:
Public

Profile:
- SelfSELFmaximum : INTEGER

minimum

.../base/string/character.li line #30

Section:
Public

Profile:
- SelfSELFminimum : INTEGER

to_integer

.../base/string/character.li line #32

Section:
Public

Profile:
- SelfSELFto_integer : INTEGER

Description:
Sign-extended conversion.

code

.../base/string/character.li line #40

Section:
Public

Profile:
- SelfSELFcode : INTEGER_8

Description:
ASCII code of Current. No Sign-extended conversion. ASCII code of Current

to_integer_8

.../base/string/character.li line #49

Section:
Public

Profile:
- SelfSELFto_integer_8 : INTEGER_8

Description:
Auto-cast.

to_uinteger_8

.../base/string/character.li line #52

Section:
Public

Profile:
- SelfSELFto_uinteger_8 : UINTEGER_8

Print.

print

.../base/string/character.li line #58

Section:
Public

Profile:
- SelfSELFprint 

Switch case :

when then

.../base/string/character.li line #64

Section:
Public

Profile:
- SelfSELFwhen   value : CHARACTER  then   block :{}CHARACTER

when or then

.../base/string/character.li line #70

Section:
Public

Profile:
- SelfSELFwhen   value1 : CHARACTER  or   value2 : CHARACTER  then   block :{}CHARACTER

when to then

.../base/string/character.li line #76

Section:
Public

Profile:
- SelfSELFwhen   first_value : CHARACTER  to   last_value : CHARACTER  then   block :{}CHARACTER

Looping.

to do

.../base/string/character.li line #87

Section:
Public

Profile:
- SelfSELFto   limit_up : SELF  do   blc :{ CHARACTER; }

downto do

.../base/string/character.li line #95

Section:
Public

Profile:
- SelfSELFdownto   limit_down : SELF  do   blc :{ CHARACTER; }

to by do

.../base/string/character.li line #103

Section:
Public

Profile:
- SelfSELFto   limit_up : SELF  by   step : SELF  do   blc :{ CHARACTER; }

downto by do

.../base/string/character.li line #111

Section:
Public

Profile:
- SelfSELFdownto   limit_down : SELF  by   step : SELF  do   blc :{ CHARACTER; }

Binary operator :

Infix '+'

.../base/string/character.li line #123

Section:
Public

Profile:
- SelfSELF+ '  other : CHARACTERCHARACTER

Infix '-'

.../base/string/character.li line #125

Section:
Public

Profile:
- SelfSELF- '  other : CHARACTERCHARACTER

Infix '-!'

.../base/string/character.li line #127

Section:
Public

Profile:
- SelfSELF-! '  other : CHARACTERINTEGER

Infix '+#'

.../base/string/character.li line #129

Section:
Public

Profile:
- SelfSELF+# '  other : INTEGERCHARACTER

Infix '-#'

.../base/string/character.li line #131

Section:
Public

Profile:
- SelfSELF-# '  other : INTEGERCHARACTER

Infix '<>'

.../base/string/character.li line #133

Section:
Public

Profile:
- SelfSELF<> '  other : SELFBOOLEAN

Description:
An other difference syntax (Pascal like)

Infix '<'

.../base/string/character.li line #136

Section:
Public

Profile:
- SelfSELF< '  other : SELFBOOLEAN

Description:
Comparison using code. Is self strictly less than other?

Infix '<='

.../base/string/character.li line #139

Section:
Public

Profile:
- SelfSELF<= '  other : SELFBOOLEAN

Description:
Comparison using code. Is self less than or equal other?

Infix '>'

.../base/string/character.li line #142

Section:
Public

Profile:
- SelfSELF> '  other : SELFBOOLEAN

Description:
Comparison using code. Is self strictly greater than other?

Infix '>='

.../base/string/character.li line #145

Section:
Public

Profile:
- SelfSELF>= '  other : SELFBOOLEAN

Description:
Comparison using code. Is self greater than or equal than other?

decimal_value

.../base/string/character.li line #148

Section:
Public

Profile:
- SelfSELFdecimal_value : INTEGER

Description:
Gives the value of a decimal digit.

binary_value

.../base/string/character.li line #157

Section:
Public

Profile:
- SelfSELFbinary_value : INTEGER

Description:
Gives the value of a binary digit.

octal_value

.../base/string/character.li line #166

Section:
Public

Profile:
- SelfSELFoctal_value : INTEGER

Description:
Gives the value of an octal digit.

hexadecimal_value

.../base/string/character.li line #175

Section:
Public

Profile:
- SelfSELFhexadecimal_value : INTEGER

Description:
Gives the value of an hexadecimal digit.

same_as

.../base/string/character.li line #190

Section:
Public

Profile:
- SelfSELFsame_as   other : CHARACTERBOOLEAN

Description:
Case insensitive comparison. No difference between upper/lower case letters.

to_upper

.../base/string/character.li line #209

Section:
Public

Profile:
- SelfSELFto_upper : SELF

Description:
Conversion to the corresponding upper case.

to_lower

.../base/string/character.li line #220

Section:
Public

Profile:
- SelfSELFto_lower : SELF

Description:
Conversion to the corresponding lower case. Conversion of Current to lower case

is_letter

.../base/string/character.li line #231

Section:
Public

Profile:
- SelfSELFis_letter : BOOLEAN

Description:
Is it a letter ('a' .. 'z' or 'A' .. 'Z') ?

is_digit

.../base/string/character.li line #243

Section:
Public

Profile:
- SelfSELFis_digit : BOOLEAN

Description:
Belongs to '0'..'9'.

is_binary_digit

.../base/string/character.li line #253

Section:
Public

Profile:
- SelfSELFis_binary_digit : BOOLEAN

Description:
Belongs to '0'..'1'.

is_octal_digit

.../base/string/character.li line #261

Section:
Public

Profile:
- SelfSELFis_octal_digit : BOOLEAN

Description:
Belongs to '0'..'7'.

is_hexadecimal_digit

.../base/string/character.li line #271

Section:
Public

Profile:
- SelfSELFis_hexadecimal_digit : BOOLEAN

Description:
Is it one character of "0123456789abcdefABCDEF" ?

is_lower

.../base/string/character.li line #285

Section:
Public

Profile:
- SelfSELFis_lower : BOOLEAN

Description:
Is it some lowercase letter ('a'..'z')?

is_upper

.../base/string/character.li line #294

Section:
Public

Profile:
- SelfSELFis_upper : BOOLEAN

Description:
Is it some uppercase letter ('A'..'Z')?

is_separator

.../base/string/character.li line #303

Section:
Public

Profile:
- SelfSELFis_separator : BOOLEAN

Description:
True when character is a separator (' ', '\t', '\n', '\r', '\0', '\f', '\v')?

is_letter_or_digit

.../base/string/character.li line #310

Section:
Public

Profile:
- SelfSELFis_letter_or_digit : BOOLEAN

Description:
Is it a letter (see is_letter) or a digit (see is_digit) ?

is_identifier

.../base/string/character.li line #318

Section:
Public

Profile:
- SelfSELFis_identifier : BOOLEAN

Description:
Is it a letter or a digit or '_' ?

is_ascii

.../base/string/character.li line #324

Section:
Public

Profile:
- SelfSELFis_ascii : BOOLEAN

Description:
Is character a 8-bit ASCII character?

is_bit

.../base/string/character.li line #327

Section:
Public

Profile:
- SelfSELFis_bit : BOOLEAN

Description:
True for 0 and 1.

next

.../base/string/character.li line #330

Section:
Public

Profile:
- SelfSELFnext : CHARACTER

Description:
Give the next character (the following code);

previous

.../base/string/character.li line #336

Section:
Public

Profile:
- SelfSELFprevious : CHARACTER

Description:
Give the previous character (the code before);

Conversions:

to_string

.../base/string/character.li line #346

Section:
Public

Profile:
- SelfSELFto_string : STRING

Description:
Create a new STRING containing only this character.

to_string_in

.../base/string/character.li line #352

Section:
Public

Profile:
- SelfSELFto_string_in   str : STRING

Description:
Append this character at the end of 'str'. Thus you can save memory because no other STRING is allocated for the job.

to_hexadecimal

.../base/string/character.li line #360

Section:
Public

Profile:
- SelfSELFto_hexadecimal : STRING

Description:
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

.../base/string/character.li line #372

Section:
Public

Profile:
- SelfSELFto_hexadecimal_in   str : STRING

Description:
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

.../base/string/character.li line #398

Section:
Public

Profile:
- SelfSELFis_alpha : BOOLEAN

Description:
See is_letter (yes this is just a call to is_letter). Isn't is_letter better English ;-)

Hashing :

hash_code

.../base/string/character.li line #411

Section:
Public

Profile:
- SelfSELFhash_code : INTEGER

Description:
The hash-code value of Current.