Programming language Chora: Instant methods

Besides the operators, instant methods provide another set of functions implementing useful operations for Chora own data types. Every instant method is strictly associated to the data type in context of which you can invoke such method. For example, the instant method find() can be called in context of a string operand to search in this string for a pattern. Calling find() in context of a rect operand will report a Chora compiler error. Following instant methods are available:

Instant method name

Short description

contains()

Tests whether one set or styles operand is completely contained within another set or styles operand.

find()

Searches in the string for a character or a substring.

insert()

Inserts a substring within the string operand.

left()

Returns a leftmost part from the string operand.

middle()

Returns a part from the string operand.

remove()

Removes a part from the string operand.

right()

Returns a rightmost part from the string operand.

parse_int32()

Converts an integral number stored in the string operand into an int32 value.

parse_uint32()

Converts an integral number stored in the string operand into a uint32 value.

parse_float()

Converts a number stored in the string operand into a float value.