]> git.kaiwu.me - njs.git/commit
Changes in byte string operations.
authorIgor Sysoev <igor@sysoev.ru>
Wed, 18 Nov 2015 12:45:52 +0000 (15:45 +0300)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 18 Nov 2015 12:45:52 +0000 (15:45 +0300)
commitefbefbfe033c9a03f80a8c2b0658a9972472f92d
treefda03cd4b35475ad562e3856ab91aac2d792e91e
parent6b9a76d337cd496c52748d9d91b68991e21e8238
Changes in byte string operations.

String.bytes property is changed to String.toBytes() method.
The method serializes an Unicode string to a byte string.
It returns null if a character larger than 255 is encountered
in the Unicode string.
String.fromBytes() method converts a byte string to an Unicode string.
String.utf8 property is converted to String.fromUTF8() method.
The method converts an UTF-8 encoded byte string to an Unicode string.
String.toUTF8() serializes Unicode string to an UTF-8 encoded byte string.
njs/njs_string.c
njs/njs_string.h
njs/njs_vm.c
njs/test/njs_unit_test.c