class STR < $TEXT_STRING{CHAR,FSTR,STR}, $OPTION, $EXTERNAL_REF, $ANCHORED_FMT |
---|
**** |
________This_class_provides_a_string_implementation_in_which_each_character ___has_a_single_encoding.__The_strings_are_provided_with_immutable_semantics. ___Any_literal_strings_used_in_the_program_text_are_of_this_class. ___NOTE_1.___Where_the_local_environment_encoding_differs_from_that_in_the ________compilation_environment_then_literal_text_strings_are_unlikely_to_be ________meaningful_-_except_by_happenstance! ________2.___This_class_may_be_used_for_any_encoding_for_which_there_are_no ________combining_characters.__However,_it_is_primarily_intended_for ________characters_as_known_in_the_program_execution_environment.__The ________classes_OCT_STR,_HEX_STR_and_QUAD_STR_are_available_for_other_string ________manipulations_as_required_-_although_they_do_not_embody_value ________conversions_to_or_from_text_representations. |
attr width : CARD ; |
---|
**** | the width as determined from OS |
aclear .. Included as aclear |
---|
acopy(beg, num, srcbeg : CARD, src : SAME) .. Included as acopy |
---|
acopy(beg, num : CARD, src : SAME) .. Included as acopy |
---|
acopy(beg : CARD, src : SAME) .. Included as acopy |
---|
acopy(src : SAME) .. Included as acopy |
---|
acopy(src : $STRINGS) .. Included as acopy |
---|
acopyn(fstr : FSTP,cnt : CARD) .. Included as acopyn |
---|
acopyn(str : SAME,cnt : CARD) .. Included as acopyn |
---|
**** | This routine copies cnt items from str into self or as many as will
___fit_if_self_is_not_large_enough. |
aget(index : CARD) : CHAR |
---|
append(src : SAME) : SAME .. Included as append |
---|
create(cnt : CARD) : SAME .. Included as aref_create |
---|
**** | This routine returns a new array with cnt elements. |
array_ptr : REFERENCE .. Included as array_ptr |
---|
as_literal : STR |
---|
aset(index : CARD, elem : CHAR) |
---|
asize : CARD .. Included as asize |
---|
binstr : BINSTR |
---|
build(cursor : BIN_CURSOR) : SAME .. Included as build |
---|
build(cursor : BIN_CURSOR, lib : LIBCHARS) : SAME .. Included as build |
---|
build( .. Included as build |
---|
capitalize : SAME .. Included as capitalize |
---|
char(index : CARD) : CHAR |
---|
concat_all(arry : ARRAY{SAME}) : SAME .. Included as concat_all |
---|
contains(elem : ELT) : BOOL .. Included as contains |
---|
**** |
__This_predicate_returns_true_if_and_only_if_at_least_one_of ___the_elements_of_self_has_the_value_elem,_otherwise_false. |
contains(substr : SAME) : BOOL .. Included as contains |
---|
**** | This predicate returns true if and only if the given argument is
___a_substring_of_self_under_the_same_coding_scheme. |
convert(lib : LIBCHARS) : SAME |
---|
copy : SAME .. Included as copy |
---|
count(elem : ELT) : CARD .. Included as count |
---|
count(str : SAME) : CARD .. Included as count |
---|
count_if( .. Included as count_if |
---|
create(str : BINSTR) : SAME .. Included as create |
---|
create(sz : CARD) : SAME |
---|
**** |
__This_routine_is_the_version_of_creation_which_assumes_the_default __cultural_repertoire_and_environment. |
create(sz : CARD, lib : LIBCHARS) : SAME |
---|
**** |
__This_routine_is_the_'general'_creation_one_which_is_called_by_all_of __the_others_in_which_the_size_is_expected_to_be_the_number_of_character__codes! |
create(ch : CHAR) : SAME |
---|
**** |
__This_routine_creates_and_then_returns_a_single_element_character_string. |
create(ch : CHAR, lib : LIBCHARS) : SAME |
---|
**** |
__This_routine_creates_and_then_returns_a_single_element_character_string. |
create(ch_code : CHAR_CODE) : SAME |
---|
**** |
__This_routine_creates_a_new_single_character_string_from_the_argument. |
create(lib : LIBCHARS) : SAME |
---|
**** |
__This_routine_returns_an_empty_character_string. |
create(rns : RUNES) : SAME |
---|
create( .. Included as create |
---|
create : SAME |
---|
**** |
__This_routine_returns_an_empty_character_string. |
create_from_external_string(str_ref : REFERENCE) : SAME |
---|
create_from_external_string(str_ref : REFERENCE, lib : LIBCHARS) : SAME |
---|
cursor : STR_CURSOR |
---|
default_lib : SAME |
---|
elt_eq(first, second : ELT) : BOOL .. Included as elt_eq |
---|
**** |
__This_predicate_returns_true_if_and_only_if_the_two_arguments_are_equal. The equality relation uses the user defined is_eq routine, if the ___argument_type_is_a_subtype_of_$IS_EQ._Otherwise_it_uses_the_system_defined ___equality_routine. |
elt_eq(first,second : ETP) : BOOL .. Included as elt_eq |
---|
**** | This is the standard 'less than' predicate used in sorting routines.
___The_using_class_must_specify_an_equality_predicate_routine. |
elt_hash(elem : $OB) : CARD .. Included as elt_hash |
---|
**** |
________This_routine_returns_a_hash_value_associated_with_an_element._This ___must_have_the_property_that_if_"elt_eq(first,second)"_then ___"elt_hash(first)=elt_hash(second)"._It_could_be_defined_always_to_return_0, ___but_many_routines_will_then_become_quadratic._This_uses_the_object_"id"_by ___default.___It_may_be_redefined_in_descendants. |
elt_lt(first,second : ETP) : BOOL .. Included as elt_lt |
---|
**** |
________This_routine_is_the_standard_predicate_'less_than'_for_use_in ___sorting.___By_default_the_object_identity_components_are_compared. ___It_may_be_redefined_in_descendants. |
elt_nil : ETP .. Included as elt_nil |
---|
**** |
________This_routine_returns_the_NIL_value.___If_the_element_class_is_a ___subclass_of_$NIL_then_it_returns_nil,_otherwise_void. |
escape(esc : CHAR, elist : SAME) : SAME |
---|
every( .. Included as every |
---|
exists( .. Included as exists |
---|
exists( .. Included as exists |
---|
fmt( .. Included as fmt |
---|
fmt( .. Included as fmt |
---|
from_fstr(fstr : FSTR) : SAME |
---|
has_ind(val : CARD) : BOOL .. Included as has_ind |
---|
**** | This predicate returns true if and only if self may be indexed by the given value. |
hash : CARD .. Included as hash |
---|
**** |
__This_routine_returns_a_hash_value_formed_from_all_of_the_elements ___of_the_string. |
head(cnt : CARD) : SAME .. Included as head |
---|
index_lib : LIBCHARS .. Included as index_lib |
---|
**** | This routine returns the repertoire which is associated with self. |
is_elt_nil( elem : ETP) : BOOL .. Included as is_elt_nil |
---|
**** | This predicate returns true if and only if elem is NIL. |
is_empty : BOOL .. Included as is_empty |
---|
**** | This predicate returns true if and only if self is an empty string. |
is_eq( .. Included as is_eq |
---|
is_eq(other : $OB) : BOOL .. Included as is_eq |
---|
**** | This is the generic equality predicate. c.f. the class $IS_EQ |
is_lower : BOOL .. Included as is_lower |
---|
**** |
__This_predicate_returns_true_if_and_only_if_every_character_of_self_is ___lower-case,_otherwise_false.___Self_may_be_void. |
is_lt( .. Included as is_lt |
---|
is_nil : BOOL .. Included as is_nil |
---|
**** |
__This_predicate_returns_true_if_and_only_if_the_string_is_empty. |
is_prefix(other : SAME) : BOOL .. Included as is_prefix |
---|
**** | This predicate returns true if and only if other is identical to the
___bit-pattern_starting_at_the_beginning_of_self. |
is_str( .. Included as is_str |
---|
is_upper : BOOL .. Included as is_upper |
---|
**** |
__This_predicate_returns_true_if_and_only_if_every_character_of_self_is ___upper-case,_otherwise_false.___Self_may_be_void. |
line_mark : SAME .. Included as line_mark |
---|
**** |
__This_routine_returns_the_line_mark_corresponding_to_the_culture_of ___self_(or_the_default_if_self_is_void). |
lower : SAME .. Included as lower |
---|
minus(str : SAME) : SAME .. Included as minus |
---|
minus(str : SAME,start : CARD) : SAME .. Included as minus |
---|
mismatch(other : SAME) : CARD .. Included as mismatch |
---|
nil : SAME .. Included as nil |
---|
**** | This predicate returns true if and only if the string is empty. |
not_every( .. Included as not_every |
---|
not_exists( .. Included as not_exists |
---|
plus(elem : ELT) : SAME .. Included as plus |
---|
plus(fstr : FSTP) : SAME .. Included as plus |
---|
plus(str : SAME) : SAME .. Included as plus |
---|
pretty : STR |
---|
raw_create(length : CARD) : SAME |
---|
**** |
__This_routine_must_NOT_be_used_outside_the_required_library_where_it __has_a_special_function_in_determining_the_local_character_sizes. |
read(index : BIN_CURSOR) : SAME .. Included as read |
---|
remove(ch : ELT) : SAME .. Included as remove |
---|
remove(str : SAME) : SAME .. Included as remove |
---|
repeat(cnt : CARD) : SAME .. Included as repeat |
---|
replace(old_ch,new_ch : ELT) : SAME .. Included as replace |
---|
replace(set : SAME, new_ch : CHAR) : SAME |
---|
reverse : SAME .. Included as reverse |
---|
search(elem : ELT) : CARD .. Included as search |
---|
search(elem : ELT, start : CARD) : CARD .. Included as search |
---|
search(str : SAME) : CARD .. Included as search |
---|
search(str : SAME,start : CARD) : CARD .. Included as search |
---|
search_backwards(elem : ELT) : CARD .. Included as search_backwards |
---|
search_backwards(elem : ELT,start : CARD) : CARD .. Included as search_backwards |
---|
size : CARD |
---|
str( .. Included as str |
---|
str : STR .. Included as str |
---|
strip : SAME .. Included as strip |
---|
substring(beg, num : CARD) : SAME .. Included as substring |
---|
tail(cnt : CARD) : SAME .. Included as tail |
---|
upper : SAME .. Included as upper |
---|
write(fyle : BIN_FILE) .. Included as write |
---|
aelt!(once beg : CARD) : ELT .. Included as aelt! |
---|
aelt!(once beg, once num : CARD) : ELT .. Included as aelt! |
---|
aelt!(once beg,once num : CARD,once step : INT) : ELT .. Included as aelt! |
---|
aelt! : ELT .. Included as aelt! |
---|
aind! : CARD .. Included as aind! |
---|
aset!(val : ELT) .. Included as aset! |
---|
aset!(once beg : CARD,val : ELT) .. Included as aset! |
---|
aset!(once beg, once num : CARD, val : ELT) .. Included as aset! |
---|
aset!(once beg, once num : CARD, once step : INT,val : ELT) .. Included as aset! |
---|
chunk!(chunk_size : CARD) : SAME .. Included as chunk! |
---|
chunk!( once start : CARD, chunk_size : CARD) : SAME .. Included as chunk! |
---|
code!(once start_elem : CARD ) : CHAR_CODE .. Included as code! |
---|
code! : CHAR_CODE .. Included as code! |
---|
elt!(once start : CARD ) : ELT .. Included as elt! |
---|
elt!( once start, once num : CARD) : ELT .. Included as elt! |
---|
elt! : ELT .. Included as elt! |
---|
filter!( .. Included as filter! |
---|
ind! : CARD .. Included as ind! |
---|
not_filter!( .. Included as not_filter! |
---|
rev! : ELT .. Included as rev! |
---|
separate!(str : SAME) : SAME |
---|
set!(elem : ELT) .. Included as set! |
---|
split!(once ch : CHAR) : SAME |
---|
unique! : ETP .. Included as unique! |
---|
const Default_Array_Size : CARD := 5 ; .. Included as Default_Array_Size |
---|
const Hash_Prime : FIELD := 19 ; .. Included as Hash_Prime |
---|
append_destroy(src : SAME, destroy : BOOL) : SAME .. Included as append_destroy |
---|
buffer_scan |
---|
**** |
__This_is_a_do-nothing_dummy_to_satisfy_some_of_the_common_TEXT_STRING_requirements |
contains(code_set : CODE_STR, code : CHAR_CODE) : BOOL .. Included as contains |
---|
**** |
__This_private_predicate_returns_true_if_and_only_if_code_is_one_of ___the_elements_of_code_set. |
do_replace(old_ch, new_ch : CHAR) : SAME |
---|
**** |
__This_routine_returns_a_copy_of_self_which_has_had_every_occurrence_of __old_ch_replaced_by_new_ch. |
for_all(first, second : SAME) : BOOL .. Included as for_all |
---|
**** |
__This_private_predicate_returns_true_if_and_only_if_all_elements_of ___first_and_second_are_the_same! |
forall(elem : ELT, from, to : CARD) : BOOL .. Included as forall |
---|
**** | This private predicate is used in testing the post-condition of
___the_searching_routines_which_follow.__It_returns_true_if_and_only_if ___the_test_element_is_not_found_in_the_inclusive_range_given.__It_is ___expensive! |
is_eq_helper( .. Included as is_eq_helper |
---|
is_legal_aelts_arg(beg, num : CARD, step : INT) : BOOL .. Included as is_legal_aelts_arg |
---|
**** | This predicate returns true if and only if the arguments are legal
___values_for_aelt_and_aset_iters_below. |
aget(index : CARD) : ELT .. Included as oct_aget |
---|
aget(index : INT) : ELT .. Included as oct_aget |
---|
aset(index : CARD, val : ELT) .. Included as oct_aset |
---|
aset(index : INT, val:ELT) .. Included as oct_aset |
---|
substring(beg, num : CARD) : SAME .. Included as oct_substr |
---|
pairwise(other : SAME, last : CARD) : BOOL .. Included as pairwise |
---|
**** |
__This_private_predicate_is_used_in_the_post-condition_of_routines ___below.__It_returns_true_if_and_only_if_the_elements_of_self_and_other_are ___identical_up_to_and_not_including_last. |
attr priv_lib : CARD ; .. Included as priv_lib |
---|
**** |
__This_attribute_is_the_index_of_the_repertoire_and_encoding_of_self ___in_the_global_repertoire_list. |
attr priv_lib : CARD ; .. Included as priv_lib |
---|
**** |
__This_attribute_is_the_index_of_the_repertoire_and_encoding_of_self ___in_the_global_repertoire_list. |
store_index(elem_index : CARD) : CARD |
---|
sum_OK(arry : ARRAY{SAME}) : BOOL .. Included as sum_OK |
---|
**** |
__This_is_an_auxiliary_predicate_only_used_in_the_post-condition_test ___for_the_following_routine.___It_is_very_expensive! |
to_reverse .. Included as to_reverse |
---|
**** | This private routine is the one which actually reverses the contents
___of_the_string. |
attr width : CARD ; |
---|
**** | the width as determined from OS |