# Functions

## getCore

```
-- get iCore
local iCore = exports.iCore:getCore()
```

## shared.functions.round

{% hint style="info" %}
Round number with decimals.
{% endhint %}

```
-- get iCore
local iCore = exports.iCore:getCore()
-- then use it
local round = iCore.shared.functions.round(2.53333, 1)
print(round)
-- result will be: 2.5
```

## shared.functions.countTable

{% hint style="info" %}
Count the table then return total index.
{% endhint %}

```
local iCore = exports.iCore:getCore()
local count = iCore.shared.functions.countTable({'1','2','5'})
print(count)
-- result will be: 3
```

## shared.functions.isValueInTable

{% hint style="info" %}
Check value in table and return true or false.
{% endhint %}

```
local iCore = exports.iCore:getCore()
if iCore.shared.functions.isValueInTable('1', {'1','2','5'}) then
    print('1 is in table')
else
    print('1 is not in table')
end
-- result will be: 1 is in table
```
