# Stuff (etl_core v0.1.42)

Useful functions

# Link to this section Summary

## Functions

Converts a time in seconds to the understandable format hh:mm:ss

Takes the first elements of the list

Converts a number to a string, with the particularity that if the number is one digit, it adds the zero before it

Subtract between lists. It generalizes, and uses, the one implemented by Kernel.--/2. The difference is for when a term to "subtract" is a map; in this case its values are obtained and it is transformed into lists of tuples, applying the subtraction to them.

Generates a random string with the symbols '0123456789abcdefghijklmnopqrstuvwxyz'

# Link to this section Functions

# convert_seconds_to_humans(time)

Converts a time in seconds to the understandable format hh:mm:ss

###Parameter:

`- time: Integer. Time in second.`

###
return

Return:

`- String`

# get_firsts(list, n)

Takes the first elements of the list

###
parameters

Parameters:

```
- list: List. List.
- n: Integer. Number of elements to be taken consecutively, starting with the first.
```

###
return

Return:

```
- {A, B} (A + B = list) where
A List the first `n` elements of `list`
B List of the remaining elements of `list`
```

# integer_to_string_with_2_digits(n)

Converts a number to a string, with the particularity that if the number is one digit, it adds the zero before it

###
parameter

Parameter:

`- n: Integer. Number to convert.`

###
return

Return:

`- String.`

# list_subtraction(l1, l2)

Subtract between lists. It generalizes, and uses, the one implemented by Kernel.--/2. The difference is for when a term to "subtract" is a map; in this case its values are obtained and it is transformed into lists of tuples, applying the subtraction to them.

###
parameters

Parameters:

```
- l1: List of tuples of size 2. List of items.
- l2: List of tuples of size 2. List of elements used to compare in `l1`. Those tuples that are the same are removed from `l1`.
```

###
return

Return:

`- List of tuples of size 2`

# random_string_generate(len)

Generates a random string with the symbols '0123456789abcdefghijklmnopqrstuvwxyz'

###
parameter

Parameter:

`- len: Integer. Chain length.`

###
return

Return:

`- String.`