v2026.5.3
All Bundles
Bundle Core runtime library providing primitive types (Bool, Byte, Char, Int, Float, String), base collections, and system utilities. Every Objeck program links against this bundle automatically via lang.obl.

Char

Character class represents a Unicode character value.

Inherits: Number

Operations

Clamp # function

Returns a given value between an upper and lower bound

function : Clamp(min:Char, value:Char, max:Char) ~ Char

Parameters

NameTypeDescription
minCharminimal value
valueCharvalue between the min and max
maxCharmaximum value

Return

TypeDescription
Charmin if vaule is less than main, max if max is less than value, otherwise the value

Clear # function

Set all array elements to zero

function : Clear(c:Char[]) ~ Nil

Parameters

NameTypeDescription
cChararray

Compare # native

Compares two values

function : native : Compare(l:Char, r:Char) ~ Int

Parameters

NameTypeDescription
lCharleft compare object
rCharright compare object

Return

TypeDescription
Int0 if equal, -1 if types differ, 1 if equal

Error # function

Prints error value

function : Error() ~ Nil

ErrorLine # function

Prints error value with newline

function : ErrorLine() ~ Nil

Find # native

Searches for the first occurrence of a byte

function : native : Find(chars:Char[], search:Char) ~ Int

Parameters

NameTypeDescription
charsCharcharacter array to search
searchCharbyte to search for

Return

TypeDescription
Inttrue of found, false otherwise

Find # native

Searches for the first occurrence of a byte

function : native : Find(chars:Char[], offset:Int, search:Char) ~ Int

Parameters

NameTypeDescription
charsCharcharacter array to search
offsetIntsearch offset
searchCharbyte to search for

Return

TypeDescription
Inttrue of found, false otherwise

Find # native

Searches for the first occurrence of a character array

function : native : Find(chars:Char[], search:Char[]) ~ Int

Parameters

NameTypeDescription
charsCharcharacter array to search
searchCharcharacter array to search for

Return

TypeDescription
Intindex of first occurrence, -1 otherwise

Find # native

Searches for the first occurrence of a character array

function : native : Find(chars:Char[], offset:Int, search:Char[]) ~ Int

Parameters

NameTypeDescription
charsCharcharacter array to search
offsetIntsearch offset
searchCharcharacter array to search for

Return

TypeDescription
Intindex of first occurrence, -1 otherwise

FindAll # function

Searches for all occurrences of the character array

function : FindAll(chars:Char[], search:Char[]) ~ Int[]

Parameters

NameTypeDescription
charsCharcharacter array to search
searchCharcharacter array to search for

Return

TypeDescription
Intan array of indexes

IsChar # native

Checks of the character is a alpha digit

function : native : IsChar() ~ Bool

Return

TypeDescription
Booltrue if alpha digit, false otherwise

IsDigit # native

Checks of the character is a numeric digit

function : native : IsDigit() ~ Bool

Return

TypeDescription
Booltrue if numeric digit, false otherwise

IsLower # native

Checks if the character is lower-case

function : native : IsLower() ~ Bool

Return

TypeDescription
Booltrue if lower-case, false otherwise

IsUpper # native

Checks if the character is upper-case

function : native : IsUpper() ~ Bool

Return

TypeDescription
Booltrue if upper-case, false otherwise

IsWhitespace # native

Checks of the character is white space

function : native : IsWhitespace() ~ Bool

Return

TypeDescription
Booltrue if white space, false otherwise

Max # native

Returns the largest byte value

function : native : Max(l:Char, r:Char) ~ Char

Parameters

NameTypeDescription
lCharvalue to compare
rCharvalue to compare

Return

TypeDescription
Charlargest byte value

Min # native

Returns the smallest byte value

function : native : Min(l:Char, r:Char) ~ Char

Parameters

NameTypeDescription
lCharvalue to compare
rCharvalue to compare

Return

TypeDescription
Charsmallest byte value

Print # function

Prints value

function : Print() ~ Nil

Sort # native

Prints value with newline

function : native : Sort() ~ Char[]

ToByte # function

Returns the Character value

function : ToByte() ~ Byte

Return

TypeDescription
Bytevalue

ToBytes # function

Converts the character array to a byte array

function : ToBytes(c:Char[]) ~ Byte[]

Parameters

NameTypeDescription
cCharcharacter array

Return

TypeDescription
Bytebyte array

ToFloat # function

Returns the Float value

function : ToFloat() ~ Float

Return

TypeDescription
Floatvalue

ToHexString # native

Returns a hex string value

function : native : ToHexString() ~ String

Return

TypeDescription
Stringhex string value

ToInt # function

Returns the Int value

function : ToInt() ~ Int

Return

TypeDescription
Intvalue

ToLower # function

Converts character to lower-case

function : ToLower() ~ Char

Return

TypeDescription
Charlower-case representation

ToString # function

Returns a string representation of the char array

function : ToString(v:Char[,]) ~ String

Parameters

NameTypeDescription
vCharchar array

Return

TypeDescription
Stringstring representation of the char array

ToString # native

Returns a string representation of the value

function : native : ToString() ~ String

Return

TypeDescription
Stringstring representation of the value

ToStringUnsigned # native

Returns an unsigned string representation of the value

function : native : ToStringUnsigned() ~ String

Return

TypeDescription
Stringunsigned string representation of the value

ToUpper # native

Converts character to upper-case

function : native : ToUpper() ~ Char

Return

TypeDescription
Charupper-case representation