Convert an ACL2 string to a Java Unicode character list.
(string=>unicode string) → unicode
This converts each ACL2 character in the string to a Unicode character whose value is the code of the character. In at last some of the Lisps on which ACL2 runs, strings may include non-ASCII Unicode characters, but ACL2's view of these strings is that of the sequence of ACL2 characters whose codes are the bytes that form the UTF-8 encoding of the string. This is as expected for ASCII, but not necessarily for non-ASCII. We plan to restrict this ACL2 function to operate only on ACL2 strings consisting of ASCII characters.
See also ascii=>string.
Function:
(defun string=>unicode (string) (declare (xargs :guard (stringp string))) (let ((__function__ 'string=>unicode)) (declare (ignorable __function__)) (string=>nats string)))
Theorem:
(defthm unicode-listp-of-string=>unicode (b* ((unicode (string=>unicode string))) (unicode-listp unicode)) :rule-classes :rewrite)
Theorem:
(defthm string=>unicode-of-str-fix-string (equal (string=>unicode (str-fix string)) (string=>unicode string)))
Theorem:
(defthm string=>unicode-streqv-congruence-on-string (implies (acl2::streqv string string-equiv) (equal (string=>unicode string) (string=>unicode string-equiv))) :rule-classes :congruence)