# Types

## Classes

### **Object**

The object is default type of any class. Every class extends from Object.

#### **Extends From**

The object of the implemented language.

#### **Methods**

* `to{core type}` - Converts the object to the given core type
* `as{core type}` - Returns the object as the given core type (overridable)

### **Boolean**

A boolean object is either true or false, and is returned from comparison operations.

#### **Extends From**

Object.

#### **Methods**

* `flip` - Changes the boolean to the opposite value (true -> false, false -> true)

###

### **Character**

A character is a string-like object that contains a singular character.

#### **Extends From**

Object.

#### **Methods**

###

### **Integer**

An integer is a full numeric value.

#### **Extends From**

Object.

#### **Methods**

###

### **String**

A string is an array of characters.

#### **Extends From**

Object.

#### **Methods**

* chomp - Removes the given sub-string from the end of this string

###

### **Array**

An array is a multitude of values.

#### **Extends From**

Object.

#### **Methods**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://koi-lang.gitbook.io/docs/library-reference/core/types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
