Commit Graph

3 Commits

Author SHA1 Message Date
Julien Fischer
dcb9745d64 Delete obsolete procedures from string module.
library/string.m:
    Delete procedures that have been marked as obsolete since 2019.

NEWS:
    Announce the deletions.

tests/hard_coded/string_append_ooi.m:
tests/hard_coded/string_append_ooi_ilseq.m:
tests/hard_coded/string_presuffix.{m,exp}:
    Conform to the above changes.
2022-04-13 16:54:14 +10:00
Peter Wang
78da14c581 Add string indexing predicates that indicate a code unit was replaced.
library/string.m:
    Add index_next_repl, unsafe_index_next_repl, prev_index_repl,
    unsafe_prev_index_repl predicates that return an indication if a
    replacement character was returned because an ill-formed code unit
    sequence was encountered.

    Add more pragma inlines for indexing predicates.

    Remove may_not_duplicate attribute on the Erlang version of
    unsafe_prev_index_repl, which would conflict with the pragma inline
    declaration. This requires the helper function do_unsafe_prev_index
    to be exported.

tests/hard_coded/string_append_ooi_ilseq.m:
tests/hard_coded/string_set_char_ilseq.m:
    Use index_next_repl in test cases.

NEWS:
    Announce additions.
2019-11-19 14:23:15 +11:00
Peter Wang
cd899271c6 Make string.append(out, out, in) work with ill-formed sequences.
library/string.m:
    Simplify string.append(out, out, in) and make it work sensibly in
    the presence of ill-formed code unit sequences, breaking the input
    string after each code point or code unit in an ill-formed sequence.

tests/hard_coded/Mmakefile:
tests/hard_coded/string_append_ooi_ilseq.exp:
tests/hard_coded/string_append_ooi_ilseq.exp2:
tests/hard_coded/string_append_ooi_ilseq.m:
    Add test case.
2019-10-24 12:31:29 +11:00