# instr

`instr` has 1 variant:

{% tabs %}
{% tab title="Variant 1" %}
#### Description <a href="#description" id="description"></a>

`instr` function returns the location of a substring in a string. If substring is not found in string, then the `instr` function will return 0.

#### Declaration <a href="#declaration" id="declaration"></a>

```
int instr(char string, char substring);
```

#### Parameters <a href="#parameters" id="parameters"></a>

1. `char string`
2. `char substring`

#### Return Value <a href="#return-value" id="return-value"></a>

#### Example <a href="#example" id="example"></a>

```
int pos;pos = instr("Tech on the net", "e");
```

Result: 2 (the first occurrence of 'e'

#### See also <a href="#see-also" id="see-also"></a>
{% endtab %}
{% endtabs %}
