# Utilities¶

The utilities library provides number and text utilities for all the different libraries.

## Number¶

cos32x100() and sin32x100() are the trigonometric cosinus and sinus functions, performed with integers. Both the parameter in degrees and the result are multiplied by 100.

checkRange() checks whether a value is in range, and returns the value or, if the value is outside the range, the lower or upper limit of the range. The function is available for signed and unsigned, 16-bit and 32-bit, integers.

setMinMax() updates the minimum and maximum with the value.

## Text¶

utf2iso() converts a string coded in UTF-8 into a string coded in ISO-8859-1.

formatChar() and formatString() returns an array of characters or a string from a text following the format. Both relies on the printf() parameters for the format.

trimString() removes special characters as Enter (0x0d and 0x0a), Tab (0x09) and Space (0x20).

## Miscellaneous¶

delay_ms() is a blocking delay and shouldn't be used if the targeted platform uses an RTOS.

configurationDebug() lists the options set for the current configuration in hV_Configuration.h.