@@ -87,7 +87,7 @@ foreign import fromArray :: forall e. Array Octet -> Eff (buffer :: BUFFER | e)
8787-- | Creates a new buffer from a string with the specified encoding, sized to
8888-- | match the string.
8989fromString :: forall e . String -> Encoding -> Eff (buffer :: BUFFER | e ) Buffer
90- fromString str = fromStringImpl str <<< show
90+ fromString str = fromStringImpl str <<< encodingToNode
9191
9292foreign import fromStringImpl :: forall e . String -> String -> Eff (buffer :: BUFFER | e ) Buffer
9393
@@ -99,14 +99,14 @@ foreign import readImpl :: forall e. String -> Offset -> Buffer -> Eff (buffer :
9999
100100-- | Reads a section of a buffer as a string with the specified encoding.
101101readString :: forall e . Encoding -> Offset -> Offset -> Buffer -> Eff (buffer :: BUFFER | e ) String
102- readString = readStringImpl <<< show
102+ readString = readStringImpl <<< encodingToNode
103103
104104foreign import readStringImpl ::
105105 forall e . String -> Offset -> Offset -> Buffer -> Eff (buffer :: BUFFER | e ) String
106106
107107-- | Reads the buffer as a string with the specified encoding.
108108toString :: forall e . Encoding -> Buffer -> Eff (buffer :: BUFFER | e ) String
109- toString = toStringImpl <<< show
109+ toString = toStringImpl <<< encodingToNode
110110
111111foreign import toStringImpl :: forall e . String -> Buffer -> Eff (buffer :: BUFFER | e ) String
112112
@@ -121,7 +121,7 @@ foreign import writeImpl ::
121121-- | characters will not be written to the buffer if there is not enough capacity
122122-- | to write them fully. The number of bytes written is returned.
123123writeString :: forall e . Encoding -> Offset -> Int -> String -> Buffer -> Eff (buffer :: BUFFER | e ) Int
124- writeString = writeStringImpl <<< show
124+ writeString = writeStringImpl <<< encodingToNode
125125
126126foreign import writeStringImpl ::
127127 forall e . String -> Offset -> Int -> String -> Buffer -> Eff (buffer :: BUFFER | e ) Int
0 commit comments