Commit Graph

1 Commits

Author SHA1 Message Date
Peter Wang
7350e7f0b6 Define behaviour of string.codepoint_offset on ill-formed sequences.
library/string.m:
    Define how string.codepoint_offset counts code units in ill-formed
    sequences.

    Delete C and C# foreign implementations in favour of the Mercury
    implementation that has the intended behaviour.
    (The Java implementation uses String.offsetByCodePoints which
    also matches our intended behaviour.)

tests/hard_coded/Mmakefile:
tests/hard_coded/string_codepoint_offset_ilseq.exp2:
tests/hard_coded/string_codepoint_offset_ilseq.m:
    Add test case.
2019-10-24 09:22:13 +11:00