]> gitweb.factorcode.org Git - factor.git/blob - basis/io/encodings/string/string-docs.factor
dc0f547301e7275ce4483f0a7088ee90f2a501d9
[factor.git] / basis / io / encodings / string / string-docs.factor
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
5
6 ARTICLE: "io.encodings.string" "Encoding and decoding strings"
7 "Strings can be encoded or decoded to and from byte arrays through an encoding by passing "
8 { $link "encodings-descriptors" } " to the following words:"
9 { $subsection encode }
10 { $subsection decode } ;
11
12 HELP: decode
13 { $values { "byte-array" byte-array } { "encoding" "an encoding descriptor" }
14     { "string" string } }
15 { $description "Decodes the byte array using the given encoding, outputting a string" } ;
16
17 HELP: encode 
18 { $values { "string" string } { "encoding" "an encoding descriptor" } { "byte-array" byte-array } }
19 { $description "Encodes the given string into a byte array with the given encoding." } ;