char-set Functions¶
Idio uses a “sparse char-set” implementation for char-sets
which is essentially an array of bitsets, one per Unicode plane which
can be #f
if the plane is unused.
- function SRFI-14/char-set? o¶
test if o is an sparse-char-set
- Param o:
object to test
- Return:
#t
if o is an sparse-char-set,#f
otherwise
Is o a char-set?
- Param o:
value to test
- Type o:
any
- Return:
boolean
- function SRFI-14/make-sparse-char-set size [planes]¶
Create a sparse-char-set of size elements. If an array of 17 elements is also supplied it will be used as the planes of the sparse-char-set otherwise an empty array of 17 elements will be used.
- function SRFI-14/sparse-char-set? o¶
test if o is an sparse-char-set
- Param o:
object to test
- Return:
#t
if o is an sparse-char-set,#f
otherwise
- function SRFI-14/char-set [cps]¶
Return a character set containing the given code points.
The character set will be the same size as char-set:empty.
- function SRFI-14/copy-char-set cs¶
Return a copy of char-set cs
- function SRFI-14/string->char-set str [base?]¶
Return a char-set derived from the code points in str. Use char-set:empty as the inital char-set unless base? is supplied.
- Param str:
string to use to set code points
- Type str:
string
- Param base?:
initial char-set, defaults to char-set:empty
- Type base?:
char-set, optional
- function SRFI-14/ucs-range->char-set s e [base?]¶
Return a char-set derived from the range of code points from s to e inclusive. Use char-set:empty as the inital char-set unless base? is supplied.
- Param s:
starting code point
- Type s:
unicode
- Param e:
ending code point
- Type e:
unicode
- Param base?:
initial char-set, defaults to char-set:empty
- Type base?:
char-set, optional
- function SRFI-14/char-set->string cs¶
Return a string derived from the code points in cs.
- function SRFI-14/char-set-ref scs cp¶
Is the code point cp in the character set cs?
- Param scs:
char-set
- Type scs:
struct-instance
- Param cp:
code point
- Type cp:
unicode or fixnum
- Return:
boolean
- function SRFI-14/char-set-set! scs cp¶
Add the code point cp to the character set cs
- Param scs:
char-set
- Type scs:
struct-instance
- Param cp:
code point
- Type cp:
unicode or fixnum
- Return:
boolean
- function SRFI-14/char-set-clear! cs cp¶
Remove the code point from character set cs.
- function SRFI-14/char-set-contains? scs cp¶
Is the code point cp in the character set cs?
- Param scs:
char-set
- Type scs:
struct-instance
- Param cp:
code point
- Type cp:
unicode or fixnum
- Return:
boolean
- function SRFI-14/char-upcase cp¶
Return the uppercase variant of
cp
if one exists or cp- Param cp:
code point
- Type cp:
unicode
- Return:
uppercase variant of
cp
- Rtype:
unicode
- function SRFI-14/char-downcase cp¶
Return the lowercase variant of
cp
if one exists or cp- Param cp:
code point
- Type cp:
unicode
- Return:
lowercase variant of
cp
- Rtype:
unicode
- function SRFI-14/and-char-set [css]¶
Logical AND the code points from the character sets.
If no arguments are passed the return value is char-set:empty.
- function SRFI-14/ior-char-set [css]¶
Logical Inclusive OR the code points from the character sets.
If no arguments are passed the return value is char-set:full.
- function SRFI-14/merge-char-set [css]¶
Logical Inclusive OR the code points from the character sets.
If no arguments are passed the return value is char-set:full.
- function SRFI-14/xor-char-set [css]¶
Logical eXclusive OR the code points from the character sets.
If no arguments are passed the return value is char-set:empty.
- function SRFI-14/not-char-set cs¶
Logical complement the code points from the character set.
- function SRFI-14/char-set-adjoin cs [cps]¶
Add the code points to character set cs.
- function SRFI-14/char-set-adjoin! cs [cps]¶
Add the code points to character set cs with side-effects.
- function SRFI-14/char-set-delete cs [cps]¶
Delete the code points from character set cs.
- function SRFI-14/char-set-delete! cs [cps]¶
Delete the code points from character set cs with side-effects.
- function SRFI-14/complement-char-set cs¶
Logical complement the code points from the character set.
- function SRFI-14/complement-char-set! cs¶
Complement the code points from character set cs with side-effects.
- function SRFI-14/union-char-set [css]¶
Logical Inclusive OR the code points from the character sets.
If no arguments are passed the return value is char-set:full.
- function SRFI-14/union-char-set! [css]¶
Union of the code points from character set cs with side-effects.
If no arguments are passed the return value is a copy of char-set:empty.
- function SRFI-14/intersection-char-set [css]¶
Logical AND the code points from the character sets.
If no arguments are passed the return value is char-set:empty.
- function SRFI-14/intersection-char-set! [css]¶
Intersection of the code points from character set cs with side-effects.
If no arguments are passed the return value is a copy of char-set:full.
- function SRFI-14/difference-char-set cs [css]¶
Subtract the code points of the character sets css from cs.
- function SRFI-14/difference-char-set! cs [css]¶
Subtract the code points of the character sets css from cs with side-effects.
- function SRFI-14/fold-char-set cs f v¶
Invoke f on each code point in char-set cs and v returning the accumulated v
- function SRFI-14/char-set-for-each-set cs f¶
Invoke f on each code point in char-set cs
Last built at 2024-12-21T07:10:36Z+0000 from 62cca4c (dev) for Idio 0.3.b.6