SleelaDoc API
HTML documentation for the SLeeLa standard library (/lib)
Home › Packages › char

Package char

This package contains 2 source unit(s) defining 2 class(es) / struct(s). Each unit below lists its fields (the values it stores) and methods (the actions it performs), with a plain explanation of each.

SLChar #sleela 3.1 (lib/char/SLChar.sleela)

SLChar class

Helpers over the char type of SLEELA.syntax section 45: a char is an unsigned 16-bit UTF-16 code unit held in an integer slot. The methods classify and map ASCII and Latin-1 chars, convert between chars, codes and digits, and recognize surrogates. Chars beyond Latin-1 need the Unicode tables and are the business of the Java text tier.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MIN_VALUEstatic final int MIN_VALUE = 0Range of a char: an unsigned 16-bit UTF-16 code unit.
MAX_VALUEstatic final int MAX_VALUE = 65535No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
toCodestatic int toCode(char c)The numeric code of a char (the char widened to int).
fromCodestatic char fromCode(int n)The char with the low 16 bits of n (the narrowing every char store applies).
toStringstatic String toString(char c)No description in source.
isDigitstatic boolean isDigit(char c)48..57 are 0..9.
isUpperCasestatic boolean isUpperCase(char c)ASCII A..Z (65..90) and the Latin-1 capitals 192..222 except 215.
isLowerCasestatic boolean isLowerCase(char c)ASCII a..z (97..122) and the Latin-1 smalls 223..255 except 247.
isLetterstatic boolean isLetter(char c)No description in source.
isLetterOrDigitstatic boolean isLetterOrDigit(char c)No description in source.
isWhitespacestatic boolean isWhitespace(char c)No description in source.
toUpperCasestatic char toUpperCase(char c)Simple case mapping for ASCII and Latin-1 (one char to one char).
toLowerCasestatic char toLowerCase(char c)No description in source.
digitValuestatic int digitValue(char c, int radix)Value of c as a digit in the radix (2..36), or -1 when it is not one.
forDigitstatic char forDigit(int digit, int radix)The lower-case digit char for a value in the radix, or NUL (0) when invalid.
isHighSurrogatestatic boolean isHighSurrogate(char c)No description in source.
isLowSurrogatestatic boolean isLowSurrogate(char c)No description in source.
isSurrogatestatic boolean isSurrogate(char c)No description in source.
toCodePointstatic int toCodePoint(char high, char low)The code point of a surrogate pair.
comparestatic int compare(char a, char b)Order of two chars by code, as a negative, zero or positive int.
hashCodestatic int hashCode(char c)No description in source.

SLPackage #sleela 3.0 (lib/char/SLPackage.sleela)

SLPackage class

Defines the SLeeLa standard-library package for the char type (syntax 3.1, section 45).

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
packageNameString packageNameNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name)No description in source.
nameString name()No description in source.
availableboolean available()No description in source.