Fixing doc errors

db4
Daniel Ehrenberg 2009-01-08 15:38:03 -06:00
parent 4f4198d850
commit e927d84404
5 changed files with 44 additions and 54 deletions

View File

@ -35,7 +35,7 @@ HELP: >title
{ $description "Converts a string to title case." } ; { $description "Converts a string to title case." } ;
HELP: >case-fold HELP: >case-fold
{ $values { "string" string } { "case-fold" string } } { $values { "string" string } { "fold" string } }
{ $description "Converts a string to case-folded form." } ; { $description "Converts a string to case-folded form." } ;
HELP: upper? HELP: upper?

View File

@ -3,57 +3,47 @@
USING: help.markup help.syntax kernel ; USING: help.markup help.syntax kernel ;
IN: unicode.categories IN: unicode.categories
HELP: LETTER? HELP: LETTER
{ $values { "ch" "a character" } { "?" "a boolean" } } { $class-description "The class of upper cased letters" } ;
{ $description "Determines whether the code point is an upper-cased letter" } ;
HELP: Letter? HELP: Letter
{ $values { "ch" "a character" } { "?" "a boolean" } } { $class-description "The class of letters" } ;
{ $description "Determines whether the code point is a letter of any case" } ;
HELP: alpha? HELP: alpha
{ $values { "ch" "a character" } { "?" "a boolean" } } { $class-description "The class of code points which are alphanumeric" } ;
{ $description "Determines whether the code point is alphanumeric" } ;
HELP: blank? HELP: blank
{ $values { "ch" "a character" } { "?" "a boolean" } } { $class-description "The class of code points which are whitespace" } ;
{ $description "Determines whether the code point is whitespace" } ;
HELP: character? HELP: character
{ $values { "ch" "a character" } { "?" "a boolean" } } { $class-description "The class of numbers which are pre-defined Unicode code points" } ;
{ $description "Determines whether a number is a code point which has been assigned" } ;
HELP: control? HELP: control
{ $values { "ch" "a character" } { "?" "a boolean" } } { $class-description "The class of control characters" } ;
{ $description "Determines whether a code point is a control character" } ;
HELP: digit? HELP: digit
{ $values { "ch" "a character" } { "?" "a boolean" } } { $class-description "The class of code coints which are digits" } ;
{ $description "Determines whether a code point is a digit" } ;
HELP: letter? HELP: letter
{ $values { "ch" "a character" } { "?" "a boolean" } } { $class-description "The class of code points which are lower-cased letters" } ;
{ $description "Determines whether a code point is a lower-cased letter" } ;
HELP: printable? HELP: printable
{ $values { "ch" "a character" } { "?" "a boolean" } } { $class-description "The class of characters which are printable, as opposed to being control or formatting characters" } ;
{ $description "Determines whether a code point is printable, as opposed to being a control character or formatting character" } ;
HELP: uncased? HELP: uncased
{ $values { "ch" "a character" } { "?" "a boolean" } } { $class-description "The class of letters which don't have a case" } ;
{ $description "Determines whether a character has a case" } ;
ARTICLE: "unicode.categories" "Character classes" ARTICLE: "unicode.categories" "Character classes"
{ $vocab-link "unicode.categories" } " is a vocabulary which provides predicates for determining if a code point has a particular property, for example being a lower cased letter. These should be used in preference to the " { $vocab-link "ASCII" "ascii" } " equivalents in most cases. Below are links to the useful predicates, but note that each of these is defined to be a predicate class." { $vocab-link "unicode.categories" } " is a vocabulary which provides predicates for determining if a code point has a particular property, for example being a lower cased letter. These should be used in preference to the " { $vocab-link "ascii" } " equivalents in most cases. Below are links to classes of characters, but note that each of these also has a predicate defined, which is usually more useful."
{ $subsection blank? } { $subsection blank }
{ $subsection letter? } { $subsection letter }
{ $subsection LETTER? } { $subsection LETTER }
{ $subsection Letter? } { $subsection Letter }
{ $subsection digit? } { $subsection digit }
{ $subsection printable? } { $subsection printable }
{ $subsection alpha? } { $subsection alpha }
{ $subsection control? } { $subsection control }
{ $subsection uncased? } { $subsection uncased }
{ $subsection character? } ; { $subsection character } ;
ABOUT: "unicode.categories" ABOUT: "unicode.categories"

View File

@ -15,37 +15,37 @@ ARTICLE: "unicode.data" "Unicode data tables"
{ $subsection property? } ; { $subsection property? } ;
HELP: load-script HELP: load-script
{ $value { "filename" string } { "table" "an interval map" } } { $values { "filename" string } { "table" "an interval map" } }
{ $description "This loads a file that looks like Script.txt in the Unicode Character Database and converts it into an efficient interval map, where the keys are characters and the values are strings for the properties." } ; { $description "This loads a file that looks like Script.txt in the Unicode Character Database and converts it into an efficient interval map, where the keys are characters and the values are strings for the properties." } ;
HELP: canonical-entry HELP: canonical-entry
{ $value { "char" "a code point" } { "seq" string } } { $values { "char" "a code point" } { "seq" string } }
{ $description "Finds the canonical decomposition (NFD) for a code point" } ; { $description "Finds the canonical decomposition (NFD) for a code point" } ;
HELP: combine-chars HELP: combine-chars
{ $value { "a" "a code point" } { "b" "a code point" } { "char/f" "a code point" } } { $values { "a" "a code point" } { "b" "a code point" } { "char/f" "a code point" } }
{ $description "If a followed by b can be combined in NFC, this returns the code point of their combination." } ; { $description "If a followed by b can be combined in NFC, this returns the code point of their combination." } ;
HELP: compatibility-entry HELP: compatibility-entry
{ $value { "char" "a code point" } { "seq" string } } { $values { "char" "a code point" } { "seq" string } }
{ $description "This returns the compatibility decomposition (NFKD) for a code point" } ; { $description "This returns the compatibility decomposition (NFKD) for a code point" } ;
HELP: combining-class HELP: combining-class
{ $value { "char" "a code point" } { "n" "an integer" } } { $values { "char" "a code point" } { "n" "an integer" } }
{ $description "Finds the combining class of a code point." } ; { $description "Finds the combining class of a code point." } ;
HELP: non-starter? HELP: non-starter?
{ $value { "char" "a code point" } { "?" "a boolean" } } { $values { "char" "a code point" } { "?" "a boolean" } }
{ $description "Returns true if the code point has a combining class." } ; { $description "Returns true if the code point has a combining class." } ;
HELP: char>name HELP: char>name
{ $value { "char" "a code point" } { "name" string } } { $values { "char" "a code point" } { "name" string } }
{ $description "Looks up the name of a given code point. Warning: this is not optimized for speed, to save space." } ; { $description "Looks up the name of a given code point. Warning: this is not optimized for speed, to save space." } ;
HELP: name>char HELP: name>char
{ $value { "name" string } { "char" "a code point" } } { $values { "name" string } { "char" "a code point" } }
{ $description "Looks up the code point corresponding to a given name." } ; { $description "Looks up the code point corresponding to a given name." } ;
HELP: property? HELP: property?
{ $value { "char" "a code point" } { "property" string } { "?" "a boolean" } } { $values { "char" "a code point" } { "property" string } { "?" "a boolean" } }
{ $description "Tests whether the code point is listed under the given property in PropList.txt in the Unicode Character Database." } ; { $description "Tests whether the code point is listed under the given property in PropList.txt in the Unicode Character Database." } ;

View File

@ -24,8 +24,8 @@ VALUE: properties
: compatibility-entry ( char -- seq ) compatibility-map at ; : compatibility-entry ( char -- seq ) compatibility-map at ;
: combining-class ( char -- n ) class-map at ; : combining-class ( char -- n ) class-map at ;
: non-starter? ( char -- ? ) class-map key? ; : non-starter? ( char -- ? ) class-map key? ;
: name>char ( string -- char ) name-map at ; : name>char ( name -- char ) name-map at ;
: char>name ( char -- string ) name-map value-at ; : char>name ( char -- name ) name-map value-at ;
: property? ( char property -- ? ) properties at interval-key? ; : property? ( char property -- ? ) properties at interval-key? ;
! Loading data from UnicodeData.txt ! Loading data from UnicodeData.txt

View File

@ -23,5 +23,5 @@ HELP: nfkc
{ $description "Converts a string to Normalization Form KC" } ; { $description "Converts a string to Normalization Form KC" } ;
HELP: nfkd HELP: nfkd
{ $values { "string" string } { "nfc" "a string in NFKD" } } { $values { "string" string } { "nfkd" "a string in NFKD" } }
{ $description "Converts a string to Normalization Form KD" } ; { $description "Converts a string to Normalization Form KD" } ;