File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,10 @@ foreign import fromIntArray :: Array Int -> ArrayBuffer
33
33
-- | Convert a string into an `ArrayBuffer` representation.
34
34
foreign import fromString :: String -> ArrayBuffer
35
35
36
- -- | Convert an ArrayBuffer into a string. Uses fromCharCode and thus does not support full utf-16
37
36
foreign import decodeToStringImpl :: Fn3 (String -> Maybe String ) (Maybe String ) ArrayBuffer (Maybe String )
38
37
38
+ -- | Convert an ArrayBuffer into a string. Uses fromCharCode and thus does not support full utf-16
39
+ -- | Is currently only defined for ArrayBuffers with even numbers of bytes, as it assumes the ArrayBuffer encodes string data.
40
+ -- | For more general string-encoding forms of data, use a base64 or other encoding scheme.
39
41
decodeToString :: ArrayBuffer -> Maybe String
40
42
decodeToString = runFn3 decodeToStringImpl Just Nothing
You can’t perform that action at this time.
0 commit comments