mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-14 02:57:52 +08:00
1124c10b56
* 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.
259 B
259 B
This is the draft release notes for 0.15.0, scheduled to be released on 2021-01-01.
Deprecated features
-
The
chr
command is now deprecated. Usestr:from-codepoints
instead. -
The
ord
command is now deprecated. Usestr:to-codepoints
instead.