{"ScriptPreparationCode":null,"TestCases":[{"Name":"str2ab","Code":"str2ab(\u0027Hello world!\u0027);\r\n\r\nfunction str2ab(str) {\r\n var buf = new ArrayBuffer(str.length*2); \r\n var bufView = new Uint16Array(buf);\r\n for (var i=0, strLen=str.length; i \u003C strLen; i\u002B\u002B) {\r\n bufView[i] = str.charCodeAt(i);\r\n }\r\n return buf;\r\n}","IsDeferred":false},{"Name":"textencoder api","Code":"str2ab(\u0027Hello world!\u0027);\r\n\r\nfunction str2ab(str) {\r\n return new TextEncoder(\u0027utf-8\u0027).encode(str)\r\n}","IsDeferred":false}]}