]> gitweb.factorcode.org Git - factor.git/commitdiff
update docs, add another test
authorAlex Maestas <git@se30.xyz>
Fri, 30 Sep 2022 00:00:39 +0000 (00:00 +0000)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 20 Oct 2022 17:23:31 +0000 (10:23 -0700)
basis/unicode/control-pictures/control-pictures-docs.factor
basis/unicode/control-pictures/control-pictures-tests.factor

index 2485ffd4bd52bf40f8fc82e52f538b75c1a6c0b7..0c1e7aabd6437e4823a4cdef1b9d87fa4f4b6cac 100644 (file)
@@ -7,10 +7,19 @@ HELP: control-pictures
 { $values
     { "string" string }
 }
-{ $description "Transforms C0 control characters into their corresponding Control Picture block codepoints." } ;
+{ $description "Transforms C0 control characters, excepting spaces, into their corresponding Control Picture block codepoints." } ;
+
+HELP: control-pictures*
+{ $values
+    { "string" string }
+}
+{ $description "Transforms C0 control characters, including spaces, into their corresponding Control Picture block codepoints." } ;
+
 
 ARTICLE: "unicode.control-pictures" "Control Pictures"
-"The " { $vocab-link "unicode.control-pictures" } " vocabulary provides a utility word " { $link control-pictures } " for transforming characters in the nonprintable " { $url "http://www.unicode.org/charts/PDF/U0000.pdf" "ASCII C0 block" } " to their representations in the " { $url "http://www.unicode.org/charts/PDF/U2400.pdf" "Control Pictures" } " block. It has no effect on any other characters."
+"The " { $vocab-link "unicode.control-pictures" } " vocabulary provides utility words for transforming characters in the nonprintable " { $url "http://www.unicode.org/charts/PDF/U0000.pdf" "ASCII C0 block" } " to their representations in the " { $url "http://www.unicode.org/charts/PDF/U2400.pdf" "Control Pictures" } " block. It has no effect on any other characters."
+$nl
+"Two words are provided - " { $link control-pictures } " transforms control characters, excepting spaces, to their picture form. The variant " { $link control-pictures* } " also transforms spaces."
 ;
 
 ABOUT: "unicode.control-pictures"
index 35b2b6d496526f5a47f8716e53b54e0e36fe4e2b..e67f47a5280914c3e8ba6938d78c8a27509a4cc5 100644 (file)
@@ -6,6 +6,7 @@ USING: sequences strings tools.test unicode.control-pictures ;
 
 { "␡" } [ "\x7f" control-pictures ] unit-test
 { "a␡b" } [ "a\x7fb" control-pictures ] unit-test
+{ "a␡b" } [ "a\x7fb" control-pictures* ] unit-test
 
 { "␀␁␂␃␄␅␆␇␈␉␊␋␌␍␎␏␐␑␒␓␔␕␖␗␘␙␚␛␜␝␞␟␠!\"#$%&'()*+,-./" } [
     48 <iota> >string control-pictures*