]> gitweb.factorcode.org Git - factor.git/blob - basis/io/encodings/string/string-docs.factor
merge project-euler.factor
[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 { $subsections
10     encode
11     decode
12 } ;
13
14 HELP: decode
15 { $values { "byte-array" byte-array } { "encoding" "an encoding descriptor" }
16     { "string" string } }
17 { $description "Decodes the byte array using the given encoding, outputting a string" } ;
18
19 HELP: encode 
20 { $values { "string" string } { "encoding" "an encoding descriptor" } { "byte-array" byte-array } }
21 { $description "Encodes the given string into a byte array with the given encoding." } ;