LisaacTM Platform

STRING


String library.
Inherit/Insert Summary
inherit_abstract_string
parent_arrayed No developed.
parent_hashable No developed.
parent_comparable No developed.
 
Constructor Summary
create
create_from_string
create_filled
 
Slot Summary
storage
Collection containing characters
count
size
capacity
size
lower
upper
size
 
General :
set_storage
 
Creation / Modification :
make
Initialize the string to have at least needed_capacity characters of storage.
make_empty
Create an empty string
make_filled
Initialize string with
twin
 
Modification :
resize
Resize self. When new_count is greater than count, new positions are initialized with the default value of CHARACTER
set_capacity
Resize capacity self, but not count.
clear
Clear out the current STRING. Note: internal storage memory is neither released nor shrunk.
copy
Copy other onto Current.
fill_with
Replace every character with c.
replace_all with
Replace all occurrences of the element old_char by new_character
append
Append other to Current.
Infix '+='
prepend
Prepend other to Current
insert_string to
Insert s at index i, shifting characters from index i to count rightwards.
replace_substring from to
Replace the substring from start to end, inclusive, with s
replace_all_substring with
put to
Put ch at position index.
swap with
insert to
Insert ch after position index.
insert to on
Insert ch after position index.
shrink to
Keep only the slice [min_index .. max_index] or nothing when the slice is empty.
remove
Remove character at position index.
add_first
Add ch at first position.
add_last
Append ch to string
append_character
extend
to_lower
Convert all characters to lower case.
to_upper
Convert all characters to upper case.
keep_head
Remove all characters except for the first n. Do nothing if n >= count.
keep_tail
Remove all characters except for the last n. Do nothing if n >= count.
remove_first
Remove n first characters. If n >= count, remove all.
remove_between to
Remove all characters from strt_index to end_index inclusive.
remove_suffix
Remove the suffix s of current string.
remove_last
remove_tail
remove_prefix
Remove the prefix s of current string.
left_adjust
Remove leading blanks.
right_adjust
Remove trailing blanks.
extend_multiple by
Extend Current with n times character c.
precede_multiple by
Prepend n times character c to Current.
extend_to_count until
Extend Current with c until needed_count is reached. Do nothing if needed_count is already greater or equal to count.
precede_to_count until
Prepend c to Current until needed_count is reached. Do nothing if needed_count is already greater or equal to count.
reverse
Reverse the string.
remove_all_occurrences
Remove all occurrences of ch.
extend_unless
Extend Current (using extend) with ch unless ch is already the last character.
make_from_string
Initialize from the characters of model. Useful in proper descendants of STRING.
set_count
 
Interfacing with C string :
to_external
Gives C access to the internal storage (may be dangerous). To be compatible with C, a null character is added at the end of the internal storage. This extra null character is not part of the Eiffel STRING. Gives C access to the internal storage (may be dangerous). To be compatible with C, a null character is added at the end of the internal storage. This extra null character is not part of the Lisaac STRING.
from_external
Internal storage is set using p (may be dangerous because the external C string p is not duplicated). Assume p has a null character at the end in order to compute the Eiffel count. This extra null character is not part of the Eiffel STRING. Also consider from_external_copy to choose the most appropriate.
from_external_copy
Internal storage is set using a copy of p. Assume p has a null character at the end in order to compute the Eiffel count. This extra null character is not part of the Eiffel STRING. Also consider from_external to choose the most appropriate.
 
Guru section.
element_sizeof
The size in number of bytes for type E.
to_native_array_uinteger_8
add_last_buffer from to
item_byte offset
restore_after_external
 
Access.
item
Character at position index.
Infix '@'
Character at position index.
 
Switch case :
when then
When Self equal value, execute block
when or then
When Self equal value1 or value2, execute block
case then

See:
when_then
case_if then
If test is true then block
case_else
otherwise, execute block
 
Testing.
valid_index
True when index is valid (i.e., inside actual bounds).
is_empty
hash_code
Return a hashcode The hash-code value of Current.
Infix '<'
Is self strictly less than other?
Infix '~>'
Infix '~<'
Is Current less than other ?
Infix '!<'
Is Current less than other ? But, the upper to lower comparaison
compare
Compare alphabetically Self to other If current object equal to other, 0; if smaller, -1; if greater, 1.
same_as
Case insensitive ==.
Infix '=='
Has Current the same text as other ?
Infix '~='
Has Current the same text as other ?
item_code
Code of character at position i.
index_of since
Index of first occurrence of c at or after start_index, result = count + 1, if none.
last_index_of since
Index of first occurrence of c at or before start_index, 0 if none.
fast_index_of
Gives the index of the first occurrence ch or 0 if none.
index_of
Gives the index of the first occurrence of 'ch' or 0 if none.
first_index_of
Index of first occurrence of c at index 1 or after index 1.
fast_last_index_of
Gives the index of the last occurrence ch or 0 if none.
last_index_of
Index of last occurrence of c at index upper or before index upper.
first_difference_index
First difference index with other. if other is equal Self, return upper + 1
has
True if ch is in the STRING.
has_substring
True if other is in the STRING.
occurrences
Number of times character c appears in the string.
has_suffix
True if suffix of Current is s.
has_prefix
True if prefix of Current is p.
 
Testing and Conversion:
is_boolean
does self represent a BOOLEAN? valid BOOLEANS are "TRUE" and "FALSE".
to_boolean
Boolean value; "true" yields true, "false" yields false (what a surprise).
is_bit
True when the contents is a sequence of bits (i.e., mixed characters 0 and characters 1).
is_integer
Does self represent an INTEGER? Result is true if and only if the following two conditions hold:
1. In the following BNF grammar, the value of self can be produced by "Integer_literal", if leading and trailing separators are ignored:
Integer_literal = [Sign] Integer Sign = "+" | "-" Integer = Digit | Digit Integer Digit = "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"
2. The numerical value represented by self is within the range that can be represented by an instance of type INTEGER.
is_integer_64
Does self represent an INTEGER_64? Result is true if and only if the following two conditions hold:
1. In the following BNF grammar, the value of self can be produced by "Integer_literal", if leading and trailing separators are ignored:
Integer_literal = [Sign] Integer Sign = "+" | "-" Integer = Digit | Digit Integer Digit = "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"
2. The numerical value represented by self is within the range that can be represented by an instance of type INTEGER_64.
to_integer
self must look like an INTEGER.
to_integer_64
self must look like an INTEGER.
is_hexadecimal
to_hexadecimal
is_octal
to_octal
is_binary
to_binary
is_real_16_16
Does self represent an REAl_16_16 ? Result is true if and only if the following two conditions hold:
1. In the following BNF grammar, the value of self can be produced by "real_literal", if leading and trailing separators are ignored:
Real_literal = [Sign] Integer [Point Integer] Sign = "+" | "-" Point = "." Integer = Digit | Digit Integer Digit = "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"
2. The numerical value represented by self is within the range that can be represented by an instance of type REAL_16_16.
to_real_16_16
 
Modification:
Infix '+'
Create a new STRING which is the concatenation of self and other.
as_lower
New object with all letters in lower case.
as_upper
New object with all letters in upper case.
 
Other features:
first
Access to the very first character.
last
Access to the very last character.
substring to
New string consisting of items [start_index.. end_index].
substring_begin to_begin
substring_begin to_end
substring_end to_end
substring_index
Position of the first occurrence of other at or after 1 or 0 f none.
first_substring_index
Position of the first occurrence of other at or after 1 or 0 if none.
 
Splitting a STRING:
partition from
partition
split_str
split_str in
Same jobs as split_str but result is appended in words.
split
Split the string into an array of words. Uses is_separator of CHARACTER to find words. Gives Void or a non empty array.
split_in
Same jobs as split but result is appended in words.
is_upper
True, if all characters is_upper or '_' or digit.
split_at
Split the string at characters c into an array of words.
split_at in
Same jobs as split but result is appended in words.
same_string
Do self and other have the same character sequence? Useful in proper descendants of STRING.
to_string
New STRING having the same character sequence as self. Useful in proper descendants of STRING.
to_abstract_string
string_buffer
Private, temporary once buffer.
split_buffer
 
Display.
print
printline
fast_print
println
 

Inherit/Insert Detail

inherit_abstract_string

.../base/string/string.li line #12

Section:
Inherit

Profile:
- SelfSELFinherit_abstract_string : ABSTRACT_STRING

parent_arrayed

.../base/string/string.li line #14

Section:
Inherit

Profile:
- SelfSELFparent_arrayed : ARRAYED

parent_hashable

.../base/string/abstract_string.li line #13

Section:
Inherit

Profile:
- SelfSELFparent_hashable : HASHABLE

parent_comparable

.../base/string/abstract_string.li line #15

Section:
Inherit

Profile:
- SelfSELFparent_comparable : COMPARABLE

Constructor Detail

create

.../base/string/string.li line #39

Section:
Public

Profile:
- SelfSELFcreate   needed_capacity : INTEGERSELF

create_from_string

.../base/string/string.li line #46

Section:
Public

Profile:
- SelfSELFcreate_from_string   str : ABSTRACT_STRINGSELF

create_filled

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

Section:
Public

Profile:
- SelfSELFcreate_filled  ( c : CHARACTER, n : INTEGER) : SELF

Detail slot

storage

.../base/string/string.li line #18

Section:
Public

Profile:
+ SelfSELFstorage : NATIVE_ARRAYCHARACTER)

Description:
Collection containing characters

count

.../base/string/string.li line #22

Section:
Public

Profile:
+ SelfSELFcount : INTEGER

Description:
size

capacity

.../base/string/string.li line #24

Section:
Public

Profile:
+ SelfSELFcapacity : INTEGER

Description:
size

lower

.../base/string/abstract_string.li line #27

Section:
Public

Profile:
- SelfSELFlower : INTEGER

upper

.../base/string/abstract_string.li line #29

Section:
Public

Profile:
- SelfSELFupper : INTEGER

Description:
size

General :

set_storage

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

Section:
Public

Profile:
- SelfSELFset_storage   tab : NATIVE_ARRAYCHARACTER)

Creation / Modification :

make

.../base/string/string.li line #54

Section:
Public

Profile:
- SelfSELFmake   needed_capacity : INTEGER

Description:
Initialize the string to have at least needed_capacity characters of storage.

make_empty

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

Section:
Public

Profile:
- SelfSELFmake_empty 

Description:
Create an empty string

make_filled

.../base/string/string.li line #83

Section:
Public

Profile:
- SelfSELFmake_filled  ( c : CHARACTER, n : INTEGER)
Initialize string with

twin

.../base/string/string.li line #98

Section:
Public

Profile:
- SelfSELFtwin : STRING

Modification :

resize

.../base/string/string.li line #107

Section:
Public

Profile:
- SelfSELFresize   new_count : INTEGER

Description:
Resize self. When new_count is greater than count, new positions are initialized with the default value of CHARACTER

set_capacity

.../base/string/string.li line #132

Section:
Public

Profile:
- SelfSELFset_capacity   new_capacity : INTEGER

Description:
Resize capacity self, but not count.

clear

.../base/string/string.li line #150

Section:
Public

Profile:
- SelfSELFclear 

Description:
Clear out the current STRING. Note: internal storage memory is neither released nor shrunk.

copy

.../base/string/string.li line #158

Section:
Public

Profile:
- SelfSELFcopy   other : ABSTRACT_STRING

Description:
Copy other onto Current.

fill_with

.../base/string/string.li line #172

Section:
Public

Profile:
- SelfSELFfill_with   c : CHARACTER

Description:
Replace every character with c.

replace_all with

.../base/string/string.li line #180

Section:
Public

Profile:
- SelfSELFreplace_all   old_char : CHARACTER  with   new_char : CHARACTER

Description:
Replace all occurrences of the element old_char by new_character

append

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

Section:
Public

Profile:
- SelfSELFappend   other : ABSTRACT_STRING

Description:
Append other to Current.

Infix '+='

.../base/string/string.li line #210

Section:
Public

Profile:
- SelfSELF+= '  other : ABSTRACT_STRINGSTRING_BUFFER

prepend

.../base/string/string.li line #216

Section:
Public

Profile:
- SelfSELFprepend   other : ABSTRACT_STRING

Description:
Prepend other to Current

insert_string to

.../base/string/string.li line #230

Section:
Public

Profile:
- SelfSELFinsert_string   s : ABSTRACT_STRING  to   i : INTEGER

Description:
Insert s at index i, shifting characters from index i to count rightwards.

replace_substring from to

.../base/string/string.li line #248

Section:
Public

Profile:
- SelfSELFreplace_substring   s : ABSTRACT_STRING  from   start : INTEGER  to   end : INTEGER

Description:
Replace the substring from start to end, inclusive, with s

replace_all_substring with

.../base/string/string.li line #276

Section:
Public

Profile:
- SelfSELFreplace_all_substring   motif : ABSTRACT_STRING  with   txt : ABSTRACT_STRING

put to

.../base/string/string.li line #288

Section:
Public

Profile:
- SelfSELFput   ch : CHARACTER  to   index : INTEGER

Description:
Put ch at position index.

swap with

.../base/string/string.li line #297

Section:
Public

Profile:
- SelfSELFswap   i1 : INTEGER  with   i2 : INTEGER

insert to

.../base/string/string.li line #312

Section:
Public

Profile:
- SelfSELFinsert   ch : CHARACTER  to   index : INTEGER

Description:
Insert ch after position index.

insert to on

.../base/string/string.li line #329

Section:
Public

Profile:
- SelfSELFinsert   ch : CHARACTER  to   index : INTEGER  on   nb : INTEGER

Description:
Insert ch after position index.

shrink to

.../base/string/string.li line #340

Section:
Public

Profile:
- SelfSELFshrink   min_index : INTEGER  to   max_index : INTEGER

Description:
Keep only the slice [min_index .. max_index] or nothing when the slice is empty.

remove

.../base/string/string.li line #362

Section:
Public

Profile:
- SelfSELFremove   index : INTEGER

Description:
Remove character at position index.

add_first

.../base/string/string.li line #373

Section:
Public

Profile:
- SelfSELFadd_first   ch : CHARACTER

Description:
Add ch at first position.

add_last

.../base/string/string.li line #388

Section:
Public

Profile:
- SelfSELFadd_last   ch : CHARACTER

Description:
Append ch to string

append_character

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

Section:
Public

Profile:
- SelfSELFappend_character   c : CHARACTER

extend

.../base/string/string.li line #413

Section:
Public

Profile:
- SelfSELFextend   c : CHARACTER

to_lower

.../base/string/string.li line #415

Section:
Public

Profile:
- SelfSELFto_lower 

Description:
Convert all characters to lower case.

to_upper

.../base/string/string.li line #423

Section:
Public

Profile:
- SelfSELFto_upper 

Description:
Convert all characters to upper case.

keep_head

.../base/string/string.li line #431

Section:
Public

Profile:
- SelfSELFkeep_head   n : INTEGER

Description:
Remove all characters except for the first n. Do nothing if n >= count.

keep_tail

.../base/string/string.li line #445

Section:
Public

Profile:
- SelfSELFkeep_tail   n : INTEGER

Description:
Remove all characters except for the last n. Do nothing if n >= count.

remove_first

.../base/string/string.li line #459

Section:
Public

Profile:
- SelfSELFremove_first   n : INTEGER

Description:
Remove n first characters. If n >= count, remove all.

remove_between to

.../base/string/string.li line #477

Section:
Public

Profile:
- SelfSELFremove_between   start : INTEGER  to   end : INTEGER

Description:
Remove all characters from strt_index to end_index inclusive.

remove_suffix

.../base/string/string.li line #495

Section:
Public

Profile:
- SelfSELFremove_suffix   s : ABSTRACT_STRING

Description:
Remove the suffix s of current string.

remove_last

.../base/string/string.li line #502

Section:
Public

Profile:
- SelfSELFremove_last   n : INTEGER

remove_tail

.../base/string/string.li line #517

Section:
Public

Profile:
- SelfSELFremove_tail   n : INTEGER

remove_prefix

.../base/string/string.li line #522

Section:
Public

Profile:
- SelfSELFremove_prefix   s : ABSTRACT_STRING

Description:
Remove the prefix s of current string.

left_adjust

.../base/string/string.li line #529

Section:
Public

Profile:
- SelfSELFleft_adjust 

Description:
Remove leading blanks.

right_adjust

.../base/string/string.li line #539

Section:
Public

Profile:
- SelfSELFright_adjust 

Description:
Remove trailing blanks.

extend_multiple by

.../base/string/string.li line #548

Section:
Public

Profile:
- SelfSELFextend_multiple   c : CHARACTER  by   n : INTEGER

Description:
Extend Current with n times character c.

precede_multiple by

.../base/string/string.li line #561

Section:
Public

Profile:
- SelfSELFprecede_multiple   c : CHARACTER  by   n : INTEGER

Description:
Prepend n times character c to Current.

extend_to_count until

.../base/string/string.li line #580

Section:
Public

Profile:
- SelfSELFextend_to_count   c : CHARACTER  until   needed_count : INTEGER

Description:
Extend Current with c until needed_count is reached. Do nothing if needed_count is already greater or equal to count.

precede_to_count until

.../base/string/string.li line #593

Section:
Public

Profile:
- SelfSELFprecede_to_count   c : CHARACTER  until   needed_count : INTEGER

Description:
Prepend c to Current until needed_count is reached. Do nothing if needed_count is already greater or equal to count.

reverse

.../base/string/string.li line #610

Section:
Public

Profile:
- SelfSELFreverse 

Description:
Reverse the string.

remove_all_occurrences

.../base/string/string.li line #623

Section:
Public

Profile:
- SelfSELFremove_all_occurrences   ch : CHARACTER

Description:
Remove all occurrences of ch.

extend_unless

.../base/string/string.li line #637

Section:
Public

Profile:
- SelfSELFextend_unless   ch : CHARACTER

Description:
Extend Current (using extend) with ch unless ch is already the last character.

make_from_string

.../base/string/string.li line #651

Section:
Public

Profile:
- SelfSELFmake_from_string   model : ABSTRACT_STRING

Description:
Initialize from the characters of model. Useful in proper descendants of STRING.

set_count

.../base/string/string.li line #668

Section:
Public

Profile:
- SelfSELFset_count   new_count : INTEGER

Interfacing with C string :

to_external

.../base/string/string.li line #680

Section:
Public

Profile:
- SelfSELFto_external : NATIVE_ARRAYCHARACTER)

Description:
Gives C access to the internal storage (may be dangerous). To be compatible with C, a null character is added at the end of the internal storage. This extra null character is not part of the Eiffel STRING. Gives C access to the internal storage (may be dangerous). To be compatible with C, a null character is added at the end of the internal storage. This extra null character is not part of the Lisaac STRING.

from_external

.../base/string/string.li line #701

Section:
Public

Profile:
- SelfSELFfrom_external   p : NATIVE_ARRAYCHARACTER)

Description:
Internal storage is set using p (may be dangerous because the external C string p is not duplicated). Assume p has a null character at the end in order to compute the Eiffel count. This extra null character is not part of the Eiffel STRING. Also consider from_external_copy to choose the most appropriate.

from_external_copy

.../base/string/string.li line #723

Section:
Public

Profile:
- SelfSELFfrom_external_copy   p : NATIVE_ARRAYCHARACTER)

Description:
Internal storage is set using a copy of p. Assume p has a null character at the end in order to compute the Eiffel count. This extra null character is not part of the Eiffel STRING. Also consider from_external to choose the most appropriate.

Guru section.

element_sizeof

.../base/string/string.li line #743

Section:
Public

Profile:
- SelfSELFelement_sizeof : INTEGER

Description:
The size in number of bytes for type E.

to_native_array_uinteger_8

.../base/string/string.li line #745

Section:
Public

Profile:
- SelfSELFto_native_array_uinteger_8 : NATIVE_ARRAYUINTEGER_8)

add_last_buffer from to

.../base/string/string.li line #750

Section:
Public

Profile:
- SelfSELFadd_last_buffer   buf : FAST_ARRAYUINTEGER_8)  from   beg : INTEGER  to   end : INTEGER

item_byte offset

.../base/string/string.li line #757

Section:
Public

Profile:
- SelfSELFitem_byte   idx : INTEGER  offset   ofs : INTEGERUINTEGER_8

restore_after_external

.../base/string/string.li line #764

Section:
Public

Profile:
- SelfSELFrestore_after_external 

Access.

item

.../base/string/abstract_string.li line #39

Section:
Public

Profile:
- SelfSELFitem   index : INTEGERCHARACTER

Description:
Character at position index.

Require:
index is valid

Infix '@'

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

Section:
Public

Profile:
- SelfSELF@ ' Left 1  index : INTEGERCHARACTER

Description:
Character at position index.

Switch case :

when then

.../base/string/abstract_string.li line #59

Section:
Public

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

Description:
When Self equal value, execute block

when or then

.../base/string/abstract_string.li line #66

Section:
Public

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

Description:
When Self equal value1 or value2, execute block

case then

.../base/string/abstract_string.li line #73

Section:
Public

Profile:
- SelfSELFcase   value : ABSTRACT_STRING  then   block :{}ABSTRACT_STRING

See:
when_then

case_if then

.../base/string/abstract_string.li line #86

Section:
Public

Profile:
- SelfSELFcase_if   test :{ BOOLEAN}  then   block :{}ABSTRACT_STRING

Description:
If test is true then block

case_else

.../base/string/abstract_string.li line #99

Section:
Public

Profile:
- SelfSELFcase_else   block :{}

Description:
otherwise, execute block

Testing.

valid_index

.../base/string/abstract_string.li line #109

Section:
Public

Profile:
- SelfSELFvalid_index   index : INTEGERBOOLEAN

Description:
True when index is valid (i.e., inside actual bounds).

is_empty

.../base/string/abstract_string.li line #113

Section:
Public

Profile:
- SelfSELFis_empty : BOOLEAN

hash_code

.../base/string/abstract_string.li line #116

Section:
Public

Profile:
- SelfSELFhash_code : INTEGER

Description:
Return a hashcode The hash-code value of Current.

Infix '<'

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

Section:
Public

Profile:
- SelfSELF< '  other : SELFBOOLEAN

Description:
Is self strictly less than other?

Infix '~>'

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

Section:
Public

Profile:
- SelfSELF~> '  other : ABSTRACT_STRINGBOOLEAN

Infix '~<'

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

Section:
Public

Profile:
- SelfSELF~< '  other : ABSTRACT_STRINGBOOLEAN

Description:
Is Current less than other ?

Infix '!<'

.../base/string/abstract_string.li line #154

Section:
Public

Profile:
- SelfSELF!< '  other : ABSTRACT_STRINGBOOLEAN

Description:
Is Current less than other ? But, the upper to lower comparaison

compare

.../base/string/abstract_string.li line #177

Section:
Public

Profile:
- SelfSELFcompare   other : ABSTRACT_STRINGINTEGER

Description:
Compare alphabetically Self to other If current object equal to other, 0; if smaller, -1; if greater, 1.

same_as

.../base/string/abstract_string.li line #206

Section:
Public

Profile:
- SelfSELFsame_as   other : ABSTRACT_STRINGBOOLEAN

Description:
Case insensitive ==.

Infix '=='

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

Section:
Public

Profile:
- SelfSELF== ' Left 40  other : EBOOLEAN

Description:
Has Current the same text as other ?

Infix '~='

.../base/string/abstract_string.li line #238

Section:
Public

Profile:
- SelfSELF~= ' Left 40  other : ABSTRACT_STRINGBOOLEAN

Description:
Has Current the same text as other ?

item_code

.../base/string/abstract_string.li line #252

Section:
Public

Profile:
- SelfSELFitem_code   i : INTEGERINTEGER

Description:
Code of character at position i.

index_of since

.../base/string/abstract_string.li line #259

Section:
Public

Profile:
- SelfSELFindex_of   ch : CHARACTER  since   start_index : INTEGERINTEGER

Description:
Index of first occurrence of c at or after start_index, result = count + 1, if none.

last_index_of since

.../base/string/abstract_string.li line #274

Section:
Public

Profile:
- SelfSELFlast_index_of   ch : CHARACTER  since   start_index : INTEGERINTEGER

Description:
Index of first occurrence of c at or before start_index, 0 if none.

fast_index_of

.../base/string/abstract_string.li line #290

Section:
Public

Profile:
- SelfSELFfast_index_of   ch : CHARACTERINTEGER

Description:
Gives the index of the first occurrence ch or 0 if none.

index_of

.../base/string/abstract_string.li line #299

Section:
Public

Profile:
- SelfSELFindex_of   ch : CHARACTERINTEGER

Description:
Gives the index of the first occurrence of 'ch' or 0 if none.

first_index_of

.../base/string/abstract_string.li line #306

Section:
Public

Profile:
- SelfSELFfirst_index_of   c : CHARACTERINTEGER

Description:
Index of first occurrence of c at index 1 or after index 1.

fast_last_index_of

.../base/string/abstract_string.li line #312

Section:
Public

Profile:
- SelfSELFfast_last_index_of   ch : CHARACTERINTEGER

Description:
Gives the index of the last occurrence ch or 0 if none.

last_index_of

.../base/string/abstract_string.li line #322

Section:
Public

Profile:
- SelfSELFlast_index_of   c : CHARACTERINTEGER

Description:
Index of last occurrence of c at index upper or before index upper.

first_difference_index

.../base/string/abstract_string.li line #328

Section:
Public

Profile:
- SelfSELFfirst_difference_index   other : ABSTRACT_STRINGINTEGER

Description:
First difference index with other. if other is equal Self, return upper + 1

has

.../base/string/abstract_string.li line #349

Section:
Public

Profile:
- SelfSELFhas   ch : CHARACTERBOOLEAN

Description:
True if ch is in the STRING.

has_substring

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

Section:
Public

Profile:
- SelfSELFhas_substring   other : ABSTRACT_STRINGBOOLEAN

Description:
True if other is in the STRING.

occurrences

.../base/string/abstract_string.li line #356

Section:
Public

Profile:
- SelfSELFoccurrences   c : CHARACTERINTEGER

Description:
Number of times character c appears in the string.

has_suffix

.../base/string/abstract_string.li line #362

Section:
Public

Profile:
- SelfSELFhas_suffix   s : ABSTRACT_STRINGBOOLEAN

Description:
True if suffix of Current is s.

has_prefix

.../base/string/abstract_string.li line #383

Section:
Public

Profile:
- SelfSELFhas_prefix   p : ABSTRACT_STRINGBOOLEAN

Description:
True if prefix of Current is p.

Testing and Conversion:

is_boolean

.../base/string/abstract_string.li line #403

Section:
Public

Profile:
- SelfSELFis_boolean : BOOLEAN

Description:
does self represent a BOOLEAN? valid BOOLEANS are "TRUE" and "FALSE".

to_boolean

.../base/string/abstract_string.li line #410

Section:
Public

Profile:
- SelfSELFto_boolean : BOOLEAN

Description:
Boolean value; "true" yields true, "false" yields false (what a surprise).

is_bit

.../base/string/abstract_string.li line #418

Section:
Public

Profile:
- SelfSELFis_bit : BOOLEAN

Description:
True when the contents is a sequence of bits (i.e., mixed characters 0 and characters 1).

is_integer

.../base/string/abstract_string.li line #433

Section:
Public

Profile:
- SelfSELFis_integer : BOOLEAN

Description:
Does self represent an INTEGER? Result is true if and only if the following two conditions hold:
1. In the following BNF grammar, the value of self can be produced by "Integer_literal", if leading and trailing separators are ignored:
Integer_literal = [Sign] Integer Sign = "+" | "-" Integer = Digit | Digit Integer Digit = "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"
2. The numerical value represented by self is within the range that can be represented by an instance of type INTEGER.

is_integer_64

.../base/string/abstract_string.li line #519

Section:
Public

Profile:
- SelfSELFis_integer_64 : BOOLEAN

Description:
Does self represent an INTEGER_64? Result is true if and only if the following two conditions hold:
1. In the following BNF grammar, the value of self can be produced by "Integer_literal", if leading and trailing separators are ignored:
Integer_literal = [Sign] Integer Sign = "+" | "-" Integer = Digit | Digit Integer Digit = "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"
2. The numerical value represented by self is within the range that can be represented by an instance of type INTEGER_64.

to_integer

.../base/string/abstract_string.li line #606

Section:
Public

Profile:
- SelfSELFto_integer : INTEGER

Description:
self must look like an INTEGER.

to_integer_64

.../base/string/abstract_string.li line #664

Section:
Public

Profile:
- SelfSELFto_integer_64 : INTEGER_64

Description:
self must look like an INTEGER.

is_hexadecimal

.../base/string/abstract_string.li line #722

Section:
Public

Profile:
- SelfSELFis_hexadecimal : BOOLEAN

to_hexadecimal

.../base/string/abstract_string.li line #735

Section:
Public

Profile:
- SelfSELFto_hexadecimal : INTEGER_64

is_octal

.../base/string/abstract_string.li line #744

Section:
Public

Profile:
- SelfSELFis_octal : BOOLEAN

to_octal

.../base/string/abstract_string.li line #757

Section:
Public

Profile:
- SelfSELFto_octal : INTEGER_64

is_binary

.../base/string/abstract_string.li line #767

Section:
Public

Profile:
- SelfSELFis_binary : BOOLEAN

to_binary

.../base/string/abstract_string.li line #783

Section:
Public

Profile:
- SelfSELFto_binary : INTEGER_64

is_real_16_16

.../base/string/abstract_string.li line #796

Section:
Public

Profile:
- SelfSELFis_real_16_16 : BOOLEAN

Description:
Does self represent an REAl_16_16 ? Result is true if and only if the following two conditions hold:
1. In the following BNF grammar, the value of self can be produced by "real_literal", if leading and trailing separators are ignored:
Real_literal = [Sign] Integer [Point Integer] Sign = "+" | "-" Point = "." Integer = Digit | Digit Integer Digit = "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"
2. The numerical value represented by self is within the range that can be represented by an instance of type REAL_16_16.

to_real_16_16

.../base/string/abstract_string.li line #894

Section:
Public

Profile:
- SelfSELFto_real_16_16 : REAL_16_16

Modification:

Infix '+'

.../base/string/abstract_string.li line #969

Section:
Public

Profile:
- SelfSELF+ '  other : ABSTRACT_STRINGSTRING_BUFFER

Description:
Create a new STRING which is the concatenation of self and other.

as_lower

.../base/string/abstract_string.li line #985

Section:
Public

Profile:
- SelfSELFas_lower : STRING

Description:
New object with all letters in lower case.

as_upper

.../base/string/abstract_string.li line #995

Section:
Public

Profile:
- SelfSELFas_upper : STRING

Description:
New object with all letters in upper case.

Other features:

first

.../base/string/abstract_string.li line #1007

Section:
Public

Profile:
- SelfSELFfirst : CHARACTER

Description:
Access to the very first character.

last

.../base/string/abstract_string.li line #1019

Section:
Public

Profile:
- SelfSELFlast : CHARACTER

Description:
Access to the very last character.

substring to

.../base/string/abstract_string.li line #1031

Section:
Public

Profile:
- SelfSELFsubstring   start_index : INTEGER  to   end_index : INTEGERSTRING

Description:
New string consisting of items [start_index.. end_index].

substring_begin to_begin

.../base/string/abstract_string.li line #1053

Section:
Public

Profile:
- SelfSELFsubstring_begin   start : INTEGER  to_begin   end : INTEGERSTRING

substring_begin to_end

.../base/string/abstract_string.li line #1058

Section:
Public

Profile:
- SelfSELFsubstring_begin   start : INTEGER  to_end   end : INTEGERSTRING

substring_end to_end

.../base/string/abstract_string.li line #1063

Section:
Public

Profile:
- SelfSELFsubstring_end   start : INTEGER  to_end   end : INTEGERSTRING

substring_index

.../base/string/abstract_string.li line #1068

Section:
Public

Profile:
- SelfSELFsubstring_index  ( other : ABSTRACT_STRING, start_index : INTEGER) : INTEGER

Description:
Position of the first occurrence of other at or after 1 or 0 f none.

first_substring_index

.../base/string/abstract_string.li line #1093

Section:
Public

Profile:
- SelfSELFfirst_substring_index   other : ABSTRACT_STRINGINTEGER

Description:
Position of the first occurrence of other at or after 1 or 0 if none.

Splitting a STRING:

partition from

.../base/string/abstract_string.li line #1106

Section:
Public

Profile:
- SelfSELFpartition   sep : ABSTRACT_STRING  from   start_index : INTEGER :( STRINGSTRINGSTRING)

partition

.../base/string/abstract_string.li line #1131

Section:
Public

Profile:
- SelfSELFpartition   sep : ABSTRACT_STRING :( STRINGSTRINGSTRING)

split_str

.../base/string/abstract_string.li line #1136

Section:
Public

Profile:
- SelfSELFsplit_str   sep : ABSTRACT_STRINGARRAYSTRING)

split_str in

.../base/string/abstract_string.li line #1156

Section:
Public

Profile:
- SelfSELFsplit_str   sep : ABSTRACT_STRING  in   words : COLLECTIONSTRING)

Description:
Same jobs as split_str but result is appended in words.

split

.../base/string/abstract_string.li line #1175

Section:
Public

Profile:
- SelfSELFsplit : ARRAYSTRING)

Description:
Split the string into an array of words. Uses is_separator of CHARACTER to find words. Gives Void or a non empty array.

split_in

.../base/string/abstract_string.li line #1193

Section:
Public

Profile:
- SelfSELFsplit_in   words : COLLECTIONSTRING)

Description:
Same jobs as split but result is appended in words.

is_upper

.../base/string/abstract_string.li line #1229

Section:
Public

Profile:
- SelfSELFis_upper : BOOLEAN

Description:
True, if all characters is_upper or '_' or digit.

split_at

.../base/string/abstract_string.li line #1242

Section:
Public

Profile:
- SelfSELFsplit_at   sep : CHARACTERARRAYSTRING)

Description:
Split the string at characters c into an array of words.

split_at in

.../base/string/abstract_string.li line #1261

Section:
Public

Profile:
- SelfSELFsplit_at   sep : CHARACTER  in   words : COLLECTIONSTRING)

Description:
Same jobs as split but result is appended in words.

same_string

.../base/string/abstract_string.li line #1304

Section:
Public

Profile:
- SelfSELFsame_string   other : ABSTRACT_STRINGBOOLEAN

Description:
Do self and other have the same character sequence? Useful in proper descendants of STRING.

to_string

.../base/string/abstract_string.li line #1312

Section:
Public

Profile:
- SelfSELFto_string : STRING

Description:
New STRING having the same character sequence as self. Useful in proper descendants of STRING.

to_abstract_string

.../base/string/abstract_string.li line #1319

Section:
Public

Profile:
- SelfSELFto_abstract_string : ABSTRACT_STRING

string_buffer

.../base/string/abstract_string.li line #1321

Section:
Public

Profile:
- SelfSELFstring_buffer : STRING

Description:
Private, temporary once buffer.

split_buffer

.../base/string/abstract_string.li line #1323

Section:
Public

Profile:
- SelfSELFsplit_buffer : ARRAYSTRING)

Display.

print

.../base/string/abstract_string.li line #1329

Section:
Public

Profile:
- SelfSELFprint 

printline

.../base/string/abstract_string.li line #1335

Section:
Public

Profile:
- SelfSELFprintline 

fast_print

.../base/string/abstract_string.li line #1341

Section:
Public

Profile:
- SelfSELFfast_print 

println

.../base/string/abstract_string.li line #1346

Section:
Public

Profile:
- SelfSELFprintln