1 ! Copyright (C) 2008 Daniel Ehrenberg.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax byte-arrays strings ;
4 IN: io.encodings.string
6 ARTICLE: "io.encodings.string" "Encoding and decoding strings"
7 "Strings can be encoded or decoded to and from byte arrays through an encoding with the following words:"
9 { $subsection decode } ;
12 { $values { "byte-array" byte-array } { "encoding" "an encoding descriptor" }
14 { $description "Decodes the byte array using the given encoding, outputting a string" } ;
17 { $values { "string" string } { "encoding" "an encoding descriptor" } { "byte-array" byte-array } }
18 { $description "Encodes the given string into a byte array with the given encoding." } ;