]> gitweb.factorcode.org Git - factor.git/blob - basis/unicode/categories/categories-docs.factor
unicode: make this the API for all unicode things.
[factor.git] / basis / unicode / categories / categories-docs.factor
1 ! Copyright (C) 2008 Daniel Ehrenberg.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.syntax help.markup ;
4 IN: unicode.categories
5
6 ABOUT: "unicode.categories"
7
8 ARTICLE: "unicode.categories" "Unicode category syntax"
9 "There is special syntax sugar for making predicate classes which are unions of Unicode general categories, plus some other code."
10 { $subsections
11     POSTPONE: CATEGORY:
12     POSTPONE: CATEGORY-NOT:
13 } ;
14
15 HELP: CATEGORY:
16 { $syntax "CATEGORY: foo Nl Pd Lu | \"Diacritic\" property? ;" }
17 { $description "This defines a predicate class which is a subset of code points. In this example, " { $snippet "foo" } " is the class of characters which are in the general category Nl or Pd or Lu, or which have the Diacritic property." } ;
18
19 HELP: CATEGORY-NOT:
20 { $syntax "CATEGORY-NOT: foo Nl Pd Lu | \"Diacritic\" property? ;" }
21 { $description "This defines a predicate class which is a subset of code points, the complement of what " { $link POSTPONE: CATEGORY: } " would define. In this example, " { $snippet "foo" } " is the class of characters which are neither in the general category Nl or Pd or Lu, nor have the Diacritic property." } ;