* pkg/eval/str: move builtin ord and chr to str
Move builtin string function ord and chr to the str module and rename to
to str:to-codepoints and str:from-codepoints respectively as suggested
in #851.
* pkg/eval/str: add from-utf8-bytes & to-utf8-bytes
Add from-utf8-bytes and to-utf8-bytes functions to the str module. This
functions differ from their *-codepoints in that they handle utf8 bytes
instead of whole codepoints. Closes#851
* pkg/eval/str: range check for codepoint and bytes
str:from-codepoints
Add check if arguments codepoints are within valid unicode range, return
an OutOfRange error otherwise. Return a BadValue error if the codepoint
isn't valid. Add/change testcases.
str:from-utf8-bytes
Add check if byte arguments are within valid range, return an OutOfRange
error otherwise. Return a BadValue error if the byte sequence isn't a
valid UTF-8 sequence. Add/change testcases.
Add additional test if piping from str:to-codepoints/str:to-utf8-bytes
to str:from-codpoints/str:from-utf8-bytes returns the original input.
This will likely become a basic operation in future that can support more types
than exceptions, so putting it in the builtin namespace is appropriate.
Also remove the exc: module altogether as it contains nothing now. All the
introspection features are now implemented as fields of the exception values and
the reason values.
* Fields may now be exposed via getter methods.
* Field names are automatically converted to dashed-case.
* Assoc behavior is no longer implemented for structmaps.
* The IsStructMap marker method no longer takes a special marker argument. There
is a little danger of a value accidentally implementing this method.