string
Factor handbook > The language > Collections > Strings

Next:string? ( object -- ? )


Vocabulary
strings

Class description
The class of fixed-length character strings. See Character and string syntax for syntax and Strings for general information.

Definition


Methods














































M: string >post-data
utf8 encode
"application/octet-stream" <post-data> swap >>data ;













































































































































M: string item>xml
1 nenum T{ xml-chunk
{ seq
V{
""
T{ tag { name ~name~ } { children ~vector~ } }
""
}
}
} interpolate-xml ;










































M: string make-slot-descriptions
[
swap [ dup number>string ] dip dup dup printable?
[ 1string ] [
dup 255 <= [
H{
{ 0 "\\0" }
{ 7 "\\a" }
{ 8 "\\b" }
{ 9 "\\t" }
{ 10 "\\n" }
{ 27 "\\e" }
{ 12 "\\f" }
{ 13 "\\r" }
{ 11 "\\v" }
} ?at [ "\\x%02x" sprintf ] unless
] [ "\\u{%x}" sprintf ] if
] if slot-description boa
] map-index ;



M: string metar
"http://tgftp.nws.noaa.gov/data/observations/metar/stations/%s..."
sprintf http-get nip ;





















































































































M: string taf
"http://tgftp.nws.noaa.gov/data/forecasts/taf/stations/%s.TXT"
sprintf http-get nip ;