@@ -87,7 +87,7 @@ foreign import fromArray :: forall e. Array Octet -> Eff (buffer :: BUFFER | e)
87
87
-- | Creates a new buffer from a string with the specified encoding, sized to
88
88
-- | match the string.
89
89
fromString :: forall e . String -> Encoding -> Eff (buffer :: BUFFER | e ) Buffer
90
- fromString str = fromStringImpl str <<< show
90
+ fromString str = fromStringImpl str <<< encodingToNode
91
91
92
92
foreign import fromStringImpl :: forall e . String -> String -> Eff (buffer :: BUFFER | e ) Buffer
93
93
@@ -99,14 +99,14 @@ foreign import readImpl :: forall e. String -> Offset -> Buffer -> Eff (buffer :
99
99
100
100
-- | Reads a section of a buffer as a string with the specified encoding.
101
101
readString :: forall e . Encoding -> Offset -> Offset -> Buffer -> Eff (buffer :: BUFFER | e ) String
102
- readString = readStringImpl <<< show
102
+ readString = readStringImpl <<< encodingToNode
103
103
104
104
foreign import readStringImpl ::
105
105
forall e . String -> Offset -> Offset -> Buffer -> Eff (buffer :: BUFFER | e ) String
106
106
107
107
-- | Reads the buffer as a string with the specified encoding.
108
108
toString :: forall e . Encoding -> Buffer -> Eff (buffer :: BUFFER | e ) String
109
- toString = toStringImpl <<< show
109
+ toString = toStringImpl <<< encodingToNode
110
110
111
111
foreign import toStringImpl :: forall e . String -> Buffer -> Eff (buffer :: BUFFER | e ) String
112
112
@@ -121,7 +121,7 @@ foreign import writeImpl ::
121
121
-- | characters will not be written to the buffer if there is not enough capacity
122
122
-- | to write them fully. The number of bytes written is returned.
123
123
writeString :: forall e . Encoding -> Offset -> Int -> String -> Buffer -> Eff (buffer :: BUFFER | e ) Int
124
- writeString = writeStringImpl <<< show
124
+ writeString = writeStringImpl <<< encodingToNode
125
125
126
126
foreign import writeStringImpl ::
127
127
forall e . String -> Offset -> Int -> String -> Buffer -> Eff (buffer :: BUFFER | e ) Int
0 commit comments