class FIXED_STRING
Summary
Immutable character STRINGs indexed from 1 to count.
Direct parents
Inherit list: NATIVELY_STORED_STRING
Class invariant
Overview
Creation features
{ANY}
{FIXED_STRING}
Features
Creation:
{ANY}
{ANY}
{ANY}
{ABSTRACT_STRING}
{ANY}
Other features:
{ANY}
{}
Interfacing with C string:
{ANY}
  • to_external: POINTER
    The address of a memory region containing the text of Current, useful to interact with the C language.
Creation from C string:
{STRING_HANDLER}
{RECYCLING_POOL, STRING_RECYCLING_POOL, STRING_HANDLER}
  • recycle
    Do whatever needs to be done to free resources or recycle other objects when recycling this one
Copy On Write:
{STRING_HANDLER}
Holders management:
{}
Invariant checking:
{}
{STRING_HANDLER}
{}
{STRING_HANDLER}
{ANY}
Concatenation
{ANY}
Access
{ANY}
{STRING_HANDLER}
{STRING_HANDLER}
storage signature: only in all_check mode
{}
{STRING_HANDLER}
{ANY}
Testing:
{ANY}
Testing and Conversion:
{ANY}
Concatenation
{ANY}
Case conversion
{ANY}
String replacing
{ANY}
Other features:
{ANY}
Splitting a STRING:
{ANY}
Other features:
{ANY}
Other features here for ELKS compatibility:
{ANY}
{}
The states of the finite state automaton used in arg feature
{}
{}
{ANY}
  • in_range (lower: FIXED_STRING, upper: FIXED_STRING): BOOLEAN
    Return True if Current is in range [lower..upper]
    See also min, max, compare.
  • min (other: FIXED_STRING): FIXED_STRING
    Minimum of Current and other.
  • max (other: FIXED_STRING): FIXED_STRING
    Maximum of Current and other.
  • bounded_by (a_min: FIXED_STRING, a_max: FIXED_STRING): FIXED_STRING
    A value that is equal to Current if it is between the limits set by a_min and a_max.
{ANY}
Other features:
{ANY}
Agent-based features:
{ANY}
{ANY}
{}
Agent-based features:
{ANY}
{}
Indexing:
{ANY}
Maximum:
{}
Minimum:
{}
Bits:
{}
make_from_string (model: STRING)
effective procedure
{ANY}
Initialize from the characters of model.
hash_code: INTEGER_32
writable attribute
{ANY}
The hash-code value of Current.
intern: FIXED_STRING
effective function
{ANY}
A shared version of this string.
out_in_tagged_out_memory
effective procedure
{ANY}
Append terse printable representation of current object in tagged_out_memory.
fill_tagged_out_memory
effective procedure
{ANY}
Append a viewable information in tagged_out_memory in order to affect the behavior of out, tagged_out, etc.
copy (other: FIXED_STRING)
effective procedure
{ANY}
In fact this feature can only be used at creation time (see immutable).
immutable: BOOLEAN
writable attribute
{ANY}
Is the object immutable?
do_intern (strings: FAST_ARRAY[FIXED_STRING])
effective procedure
is_interned: BOOLEAN
writable attribute
{ANY}
substring (start_index: INTEGER_32, end_index: INTEGER_32): FIXED_STRING
effective function
{ANY}
New string consisting of items [start_index.. end_index].
make_from_fixed_string (other: FIXED_STRING, start_index: INTEGER_32, end_index: INTEGER_32)
effective procedure
{}
to_external: POINTER
effective function
{ANY}
The address of a memory region containing the text of Current, useful to interact with the C language.
from_external (p: POINTER)
effective procedure
Internal storage is set using a copy of p.
from_external_copy (p: POINTER)
effective procedure
Internal storage is set using a copy of p.
from_external_sized_copy (p: POINTER, size: INTEGER_32)
effective procedure
Internal storage is set using a copy of p.
recycle
effective procedure
Do whatever needs to be done to free resources or recycle other objects when recycling this one
is_shared: BOOLEAN
effective function
holders: FAST_ARRAY[FIXED_STRING]
writable attribute
share_with (other: FIXED_STRING)
effective procedure
unshare
effective procedure
new_holders: FAST_ARRAY[FIXED_STRING]
effective function
{}
free_holders (a_holders: FAST_ARRAY[FIXED_STRING])
effective procedure
{}
holders_memory: FAST_ARRAY[WEAK_REFERENCE[FAST_ARRAY[FIXED_STRING]]]
once function
{}
weakrefs: FAST_ARRAY[WEAK_REFERENCE[FAST_ARRAY[FIXED_STRING]]]
once function
{}
is_storage_unchanged: BOOLEAN
effective function
{}
original: FIXED_STRING
writable attribute
{}
check_can_have_storage_signature: BOOLEAN
effective function
_inline_agent48 (holder: FIXED_STRING, p: POINTER): BOOLEAN
frozen
effective function
{}
writable attribute
The place where characters are stored.
storage_lower: INTEGER_32
writable attribute
The index of the first character of storage effectively used.
count: INTEGER_32
writable attribute
{ANY}
Number of available items in the hoard.
capacity: INTEGER_32
writable attribute
{ANY}
Capacity of the storage area.
item (i: INTEGER_32): CHARACTER
effective function
{ANY}
Character at position i.
is_equal (other: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
It other does not conform to NATIVELY_STORED_STRING this query is an O(count.max(other.count)) operation, requiring iterating over both strings.
same_as (other: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
Case insensitive is_equal.
index_of (c: CHARACTER, start_index: INTEGER_32): INTEGER_32
effective function
{ANY}
Using is_equal for comparison, gives the index of the first occurrence of element at or after start_index.
fast_index_of (c: CHARACTER, start_index: INTEGER_32): INTEGER_32
effective function
{ANY}
Using basic = for comparison, gives the index of the first occurrence of element at or after start_index.
reverse_index_of (c: CHARACTER, start_index: INTEGER_32): INTEGER_32
effective function
{ANY}
Index of first occurrence of c at or before start_index, The index will be invalid, smaller than lower when no occurrence is found; The search is done in reverse direction, which means from the start_index down to the first character.
fast_reverse_index_of (c: CHARACTER, start_index: INTEGER_32): INTEGER_32
effective function
{ANY}
Index of first occurrence of c at or before start_index, The index will be invalid, smaller than lower when no occurrence is found; The search is done in reverse direction, which means from the start_index down to the first character.
has (c: CHARACTER): BOOLEAN
effective function
{ANY}
Look for x using is_equal for comparison.
fast_has (c: CHARACTER): BOOLEAN
effective function
{ANY}
Look for x using basic = for comparison.
occurrences (c: CHARACTER): INTEGER_32
effective function
{ANY}
Number of times character c appears in the string.
infix "&" (another: ABSTRACT_STRING): ABSTRACT_STRING
effective function
{ANY}
Current and another concatenating into a new object.
first: CHARACTER
effective function
{ANY}
Access to the very first character.
last: CHARACTER
effective function
{ANY}
Access to the very last character.
print_on (file: OUTPUT_STREAM)
effective procedure
{ANY}
Default printing of current object on a file.
set_count (new_count: INTEGER_32)
effective procedure
ensure_capacity (needed_capacity: INTEGER_32)
effective procedure
set_storage (new_storage: NATIVE_ARRAY[CHARACTER], new_capacity: INTEGER_32)
effective procedure
copy_slice_to_native (start_index: INTEGER_32, end_index: INTEGER_32, target: NATIVE_ARRAY[CHARACTER], target_offset: INTEGER_32)
effective procedure
check_set_storage_signature: BOOLEAN
effective function
{}
has_storage_signature: BOOLEAN
writable attribute
check_valid_storage_signature: BOOLEAN
effective function
storage_signature_count: INTEGER_32
writable attribute
lower: INTEGER_32
is 1
constant attribute
{ANY}
Minimum index; actually, this is always 1 (this feature here to mimic the one of the COLLECTION hierarchy).
upper: INTEGER_32
effective function
{ANY}
Maximum index; actually the same value as count (this feature is here to mimic the one of the COLLECTION hierarchy).
is_empty: BOOLEAN
effective function
{ANY}
Has string length 0?
infix "@" (i: INTEGER_32): CHARACTER
frozen
effective function
{ANY}
The infix notation which is actually just a synonym for item.
infix "^" (a_range: INTEGER_RANGE[INTEGER_32]): ABSTRACT_STRING
effective function
{ANY}
Substring of items in a_range .
infix "<" (other: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
Is Current less than other?
infix "<=" (other: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
Is Current less than or equal other?
infix ">" (other: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
Is Current strictly greater than other?
infix ">=" (other: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
Is Current greater than or equal than other?
compare (other: ABSTRACT_STRING): INTEGER_32
effective function
{ANY}
If current object equal to other, 0 if smaller, -1; if greater, 1.
three_way_comparison (other: ABSTRACT_STRING): INTEGER_32
effective function
{ANY}
If current object equal to other, 0 if smaller, -1; if greater, 1.
item_code (i: INTEGER_32): INTEGER_32
effective function
{ANY}
Code of character at position i.
first_index_of (c: CHARACTER): INTEGER_32
effective function
{ANY}
Index of first occurrence of c, upper` + 1 if none. See also `last_index_of, index_of, reverse_index_of.
fast_first_index_of (c: CHARACTER): INTEGER_32
effective function
{ANY}
Index of first occurrence of c, upper` + 1 if none. See also `last_index_of, index_of, reverse_index_of.
last_index_of (c: CHARACTER): INTEGER_32
effective function
{ANY}
Index of last occurrence of c, lower` - 1 if none. See also `first_index_of, reverse_index_of, index_of.
fast_last_index_of (c: CHARACTER): INTEGER_32
effective function
{ANY}
Index of last occurrence of c, lower` - 1 if none. See also `first_index_of, reverse_index_of, index_of.
has_substring (other: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
True if Current contains other.
has_suffix (s: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
True if suffix of Current is s.
has_prefix (p: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
True if prefix of Current is p.
is_ascii: BOOLEAN
effective function
{ANY}
Is Current only made of (7 bit) ASCII characters?
is_boolean: BOOLEAN
effective function
{ANY}
Does Current represent a BOOLEAN?
to_boolean: BOOLEAN
effective function
{ANY}
Boolean value "True" yields True, "False" yields False (what a surprise).
is_integer: BOOLEAN
effective function
{ANY}
Does 'Current' represent an INTEGER?
to_integer: INTEGER_32
effective function
{ANY}
Current must look like an INTEGER.
is_integer_64: BOOLEAN
effective function
{ANY}
Does 'Current' represent an INTEGER_64?
to_integer_64: INTEGER_64
effective function
{ANY}
Current must look like an INTEGER_64.
is_real: BOOLEAN
effective function
{ANY}
Can contents be read as a REAL ? Fails for numbers where the base or "10 ^ exponent" are not in the range Minimum_real ...
to_real: REAL_64
effective function
{ANY}
Conversion to the corresponding REAL value.
is_number: BOOLEAN
effective function
{ANY}
Can contents be read as a NUMBER?
to_number: NUMBER
effective function
{ANY}
Current must looks like an INTEGER.
is_bit: BOOLEAN
effective function
{ANY}
True when the contents is a sequence of bits (i.e., mixed characters 0 and characters 1).
binary_to_integer: INTEGER_32
effective function
{ANY}
Assume there is enough space in the INTEGER to store the corresponding decimal value.
infix "+" (other: ABSTRACT_STRING): STRING
effective function
{ANY}
Create a new STRING which is the concatenation of Current and other.
infix "|" (other: ABSTRACT_STRING): ROPE
effective function
{ANY}
Current and other concatenated into a new ROPE, an ABSTRACT_STRING that can be efficiently concatenated.
arg (an_index: INTEGER_32, a_value: ABSTRACT_STRING): ABSTRACT_STRING
effective function
{ANY}
A copy of Current with the placeholder "#(an_index)" is replaced (if present) with the content of a_value.
infix "#" (a_value: ABSTRACT_STRING): ABSTRACT_STRING
effective function
{ANY}
A copy of Current with a placeholder "#(n)" is replaced with the content of a_value.
as_lower: STRING
effective function
{ANY}
New object with all letters in lower case.
as_upper: STRING
effective function
{ANY}
New object with all letters in upper case.
replacing (an_old: ABSTRACT_STRING, a_new: ABSTRACT_STRING): STRING
effective function
{ANY}
Current with all occurrences of an_old string replaced with a_new.
replacing_in (an_old: ABSTRACT_STRING, a_new: ABSTRACT_STRING, buffer: STRING)
effective procedure
{ANY}
Current with all occurrences of an_old string replaced with a_new in buffer.
substring_index (other: ABSTRACT_STRING, start_index: INTEGER_32): INTEGER_32
effective function
{ANY}
Position of first occurrence of other at or after start_index.
first_substring_index (other: ABSTRACT_STRING): INTEGER_32
effective function
{ANY}
Position of first occurrence of other at or after 1, 0 if none.
split: ARRAY[STRING]
effective function
{ANY}
Split the string into an array of words.
split_in (words: COLLECTION[STRING])
effective procedure
{ANY}
Same jobs as split but result is appended in words.
new_iterator: ITERATOR[CHARACTER]
effective function
{ANY}
same_string (other: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
(Here for ELKS compatibility.)
string: STRING
effective function
{ANY}
(Here for ELKS compatibility.)
string_buffer: STRING
once function
{}
Private, temporary once buffer.
split_buffer: ARRAY[STRING]
once function
{}
computed_hash_code: INTEGER_32
effective function
{}
interned: HASHED_DICTIONARY[FAST_ARRAY[FIXED_STRING], INTEGER_32]
once function
{}
Key: hash_code Item: interned string
always_print_state: INTEGER_32
is -1
constant attribute
{}
normal_state: INTEGER_32
is 0
constant attribute
{}
after_delimiter_state: INTEGER_32
is 1
constant attribute
{}
after_brace_state: INTEGER_32
is 2
constant attribute
{}
Please note that we picked the same values used in MESSAGE_FORMATTER.
debug_string: STRING
writable attribute
{}
only used to display the content of the FIXED_STRING in the trace stack
in_range (lower: FIXED_STRING, upper: FIXED_STRING): BOOLEAN
effective function
{ANY}
Return True if Current is in range [lower..upper]
See also min, max, compare.
min (other: FIXED_STRING): FIXED_STRING
effective function
{ANY}
Minimum of Current and other.
max (other: FIXED_STRING): FIXED_STRING
effective function
{ANY}
Maximum of Current and other.
bounded_by (a_min: FIXED_STRING, a_max: FIXED_STRING): FIXED_STRING
effective function
{ANY}
A value that is equal to Current if it is between the limits set by a_min and a_max.
enumerate: ENUMERATE[E_]
effective function
{ANY}
get_new_iterator: ITERATOR[E_]
frozen
effective function
{ANY}
for_each (action: PROCEDURE[TUPLE[TUPLE 1[E_]]])
effective procedure
{ANY}
Apply action to every item of Current.
for_all (test: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
{ANY}
Do all items satisfy test?
exists (test: FUNCTION[TUPLE[TUPLE 1[E_]]]): BOOLEAN
effective function
{ANY}
Does at least one item satisfy test?
aggregate (action: FUNCTION[TUPLE[TUPLE 2[E_, E_], E_]], initial: E_): E_
effective function
{ANY}
Aggregate all the elements starting from the initial value.
generation: INTEGER_32
writable attribute
{ANY}
next_generation
effective procedure
{}
do_all (action: ROUTINE[TUPLE[TUPLE 1[E_]]])
frozen
effective procedure
{ANY}
Apply action to every item of Current.
_inline_agent1 (a: ROUTINE[TUPLE[TUPLE 1[E_]]], e: E_)
frozen
effective procedure
{}
valid_index (i: INTEGER_32): BOOLEAN
effective function
{ANY}
True when i is valid (i.e., inside actual bounds).
Maximum_character_code: INTEGER_16
{}
Largest supported code for CHARACTER values.
Maximum_integer_8: INTEGER_8
is 127
constant attribute
{}
Largest supported value of type INTEGER_8.
Maximum_integer_16: INTEGER_16
is 32767
constant attribute
{}
Largest supported value of type INTEGER_16.
Maximum_integer: INTEGER_32
is 2147483647
constant attribute
{}
Largest supported value of type INTEGER/INTEGER_32.
Maximum_integer_32: INTEGER_32
is 2147483647
constant attribute
{}
Largest supported value of type INTEGER/INTEGER_32.
Maximum_integer_64: INTEGER_64
is 9223372036854775807
constant attribute
{}
Largest supported value of type INTEGER_64.
Maximum_real_32: REAL_32
is {REAL_32 3.4028234663852885981170418348451692544e+38}
constant attribute
{}
Largest non-special (no NaNs nor infinity) supported value of type REAL_32.
Maximum_real: REAL_64
{}
Largest non-special (no NaNs nor infinity) supported value of type REAL.
Maximum_real_64: REAL_64
{}
Largest non-special (no NaNs nor infinity) supported value of type REAL.
Maximum_real_80: REAL_EXTENDED
{}
Largest supported value of type REAL_80.
Minimum_character_code: INTEGER_16
{}
Smallest supported code for CHARACTER values.
Minimum_integer_8: INTEGER_8
is -128
constant attribute
{}
Smallest supported value of type INTEGER_8.
Minimum_integer_16: INTEGER_16
is -32768
constant attribute
{}
Smallest supported value of type INTEGER_16.
Minimum_integer: INTEGER_32
is -2147483648
constant attribute
{}
Smallest supported value of type INTEGER/INTEGER_32.
Minimum_integer_32: INTEGER_32
is -2147483648
constant attribute
{}
Smallest supported value of type INTEGER/INTEGER_32.
Minimum_integer_64: INTEGER_64
is -9223372036854775808
constant attribute
{}
Smallest supported value of type INTEGER_64.
Minimum_real_32: REAL_32
is {REAL_32 -3.40282346638528859811704183484516925440e+38}
constant attribute
{}
Smallest non-special (no NaNs nor infinity) supported value of type REAL_32.
Minimum_real: REAL_64
{}
Smallest non-special (no NaNs nor infinity) supported value of type REAL.
Minimum_real_64: REAL_64
{}
Smallest non-special (no NaNs nor infinity) supported value of type REAL.
Minimum_real_80: REAL_64
{}
Smallest supported value of type REAL_80.
Boolean_bits: INTEGER_32
{}
Number of bits in a value of type BOOLEAN.
Character_bits: INTEGER_32
{}
Number of bits in a value of type CHARACTER.
Integer_bits: INTEGER_32
{}
Number of bits in a value of type INTEGER.
Real_bits: INTEGER_32
is 64
constant attribute
{}
Number of bits in a value of type REAL.
Pointer_bits: INTEGER_32
{}
Number of bits in a value of type POINTER.