Made it clear that charToBytes returns UTF16.

This commit is contained in:
nathan 2017-08-01 00:53:36 +02:00
parent 6decb2b234
commit a615545adc
1 changed files with 1 additions and 1 deletions

View File

@ -297,7 +297,7 @@ class Sys {
*/
@SuppressWarnings("NumericCastThatLosesPrecision")
public static
byte[] charToBytes(char[] text) {
byte[] charToBytes16(char[] text) {
// NOTE: this saves the char array in UTF-16 format of bytes.
byte[] bytes = new byte[text.length * 2];
for (int i = 0; i < text.length; i++) {