# Compare

## Overview

![The Compare Node.](/files/jLUqnSTBX3NNGTvEXi2E)

The **Compare** **Node** compares two **Strings** and outputs the result indicating whether they are equal or not in two forms: an **Int** and a **Bool**.

[**Scope**](/incari-studio/2023.1/toolbox/overview.md#scopes): **Project**, **Scene**, **Function**, **Prefab**.

## Attributes

![The Compare Node Attributes.](/files/FknA5FfspDhGXY5XirUv)

### Inputs

| Attribute  | Type       | Description                                                                                               |
| ---------- | ---------- | --------------------------------------------------------------------------------------------------------- |
| `String 1` | **String** | The default value of the first **String** to be compared, if none is given in the `String 1` **Socket**.  |
| `String 2` | **String** | The default value of the second **String** to be compared, if none is given in the `String 2` **Socket**. |

## Inputs

| Input             | Type       | Description                                                           |
| ----------------- | ---------- | --------------------------------------------------------------------- |
| *Pulse Input* (►) | **Pulse**  | A standard **Input Pulse**, to trigger the execution of the **Node**. |
| `String 1`        | **String** | The first **String** to be compared.                                  |
| `String 2`        | **String** | The second **String** to be compared.                                 |

## Outputs

| Output             | Type      | Description                                                                                                                            |
| ------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| *Pulse Output* (►) | **Pulse** | A standard **Output Pulse**, to move onto the next **Node** along the **Logic Branch**, once this **Node** has finished its execution. |
| `Result`           | **Int**   | 0, if the **Strings** are equal; -1, if they are not.                                                                                  |
| `Equal`            | **Bool**  | *True*, if the **Strings** are equal; *false*, if they are not.                                                                        |

## See Also

* [**String Value**](/incari-studio/2023.1/toolbox/string/stringvalue.md)


---

# 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://docs.incari.com/incari-studio/2023.1/toolbox/string/compare.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.
