diff options
author | Eduardo Julian | 2020-12-11 22:40:31 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-12-11 22:40:31 -0400 |
commit | dff517cbdb9a1c80028782c62ad91c71ddb34909 (patch) | |
tree | f69b4005e8b6dc9699a410554ce4571f60d9e0ee /stdlib/source/lux/data/text/encoding.lux | |
parent | 9af671a34728b35c48bff2ba163c371dc5084946 (diff) |
Improved parsing speed for Lux code.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/text/encoding.lux | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stdlib/source/lux/data/text/encoding.lux b/stdlib/source/lux/data/text/encoding.lux index 140acf270..32793f515 100644 --- a/stdlib/source/lux/data/text/encoding.lux +++ b/stdlib/source/lux/data/text/encoding.lux @@ -197,7 +197,7 @@ (new [host.String]) (decode [Uint8Array] host.String)))})) -(def: #export (to-utf8 value) +(def: (to-utf8 value) (-> Text Binary) (for {@.old (java/lang/String::getBytes (..name ..utf-8) @@ -224,7 +224,7 @@ (TextEncoder::encode [value])) )})) -(def: #export (from-utf8 value) +(def: (from-utf8 value) (-> Binary (Try Text)) (for {@.old (#try.Success (java/lang/String::new value (..name ..utf-8))) @@ -248,7 +248,7 @@ (TextDecoder::decode [value]) #try.Success))})) -(structure: #export UTF-8 +(structure: #export utf8 (Codec Binary Text) (def: encode ..to-utf8) |