[m-rev.] for review: Add conversion predicates between strings and UTF-8/UTF-16 code units.
Julien Fischer
jfischer at opturion.com
Fri Feb 27 10:45:34 AEDT 2015
Hi Peter,
On Wed, 25 Feb 2015, Peter Wang wrote:
> Add the predicates:
That won't look so good in the git logs, I suggest:
Conversion of strings to lists of UTF-8/UTF-16 code units.
Add the predicates:
> string.to_utf8_code_unit_list/2
> string.to_utf16_code_unit_list/2
> string.from_utf8_code_unit_list/2
> string.from_utf16_code_unit_list/2
>
> library/string.m:
> Implement the above predicates in Mercury code that works across
> backends.
>
> Add internal_encoding_is_utf8 helper predicate.
>
> Forward the new predicates, for which the named encoding matches
> that of the backend in use, to string.to_code_unit_list and
> string.from_code_unit_list.
>
> tests/hard_coded/Mmakefile
> tests/hard_coded/string_code_unit.exp
> tests/hard_coded/string_code_unit.m
> Add test case.
>
> NEWS:
> Announce the additions.
The diff looks fine, otherwise.
Cheers,
Julien.
More information about the reviews
mailing list