Commit Graph

1 Commits

Author SHA1 Message Date
Peter Wang
4d09b5fb8f 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 to string.to_code_unit_list and
	string.from_code_unit_list when the named encoding matches that
	of the backend in use.

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.
2015-02-27 12:04:15 +11:00