diff options
author | Eduardo Julian | 2022-03-16 08:37:23 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-03-16 08:37:23 -0400 |
commit | bf53ee92fc3c33a4885aa227e55d24f7ba3cb2c4 (patch) | |
tree | 49683a62ae8e110c62b42a9a6386bb2ddb3c47c6 /stdlib/source/library/lux/data/text/encoding | |
parent | d710d9f4fc098e7c243c8a5f23cd42683f13e07f (diff) |
De-sigil-ification: prefix :
Diffstat (limited to 'stdlib/source/library/lux/data/text/encoding')
-rw-r--r-- | stdlib/source/library/lux/data/text/encoding/utf8.lux | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/source/library/lux/data/text/encoding/utf8.lux b/stdlib/source/library/lux/data/text/encoding/utf8.lux index a1627c8d2..e618307b4 100644 --- a/stdlib/source/library/lux/data/text/encoding/utf8.lux +++ b/stdlib/source/library/lux/data/text/encoding/utf8.lux @@ -75,13 +75,13 @@ @.js (cond ffi.on_nashorn? - (:as Binary ("js object do" "getBytes" value ["utf8"])) + (as Binary ("js object do" "getBytes" value ["utf8"])) ffi.on_node_js? (|> (Buffer::from|encoded value "utf8") ... This coercion is valid as per NodeJS's documentation: ... https://nodejs.org/api/buffer.html#buffer_buffers_and_typedarrays - (:as Uint8Array)) + (as Uint8Array)) ... On the browser (|> (TextEncoder::new (//.name //.utf_8)) @@ -89,14 +89,14 @@ ) @.python - (:as Binary ("python apply" (:expected ("python constant" "bytearray")) [value "utf-8"])) + (as Binary ("python apply" (as_expected ("python constant" "bytearray")) [value "utf-8"])) @.lua ("lua utf8 encode" value) @.ruby (|> value - (:as String) + (as String) (String::encode "UTF-8") (String::bytes)) @@ -104,7 +104,7 @@ (|> (..unpack [..php_byte_array_format value]) ..array_values ("php object new" "ArrayObject") - (:as Binary)) + (as Binary)) @.scheme (..string->utf8 value))) @@ -118,7 +118,7 @@ @.js (cond ffi.on_nashorn? (|> ("js object new" ("js constant" "java.lang.String") [value "utf8"]) - (:as Text) + (as Text) {try.#Success}) ffi.on_node_js? @@ -132,16 +132,16 @@ {try.#Success})) @.python - (try (:as Text ("python object do" "decode" (:expected value) ["utf-8"]))) + (try (as Text ("python object do" "decode" (as_expected value) ["utf-8"]))) @.lua {try.#Success ("lua utf8 decode" value)} @.ruby (|> value - (:as Array) + (as Array) (Array::pack "C*") - (:as String) + (as String) (String::force_encoding "UTF-8") {try.#Success}) |