ESO Recipe Execution Tool  3.13
Functions
EsoRex String Utility Functions

Functions

int er_strutils_termwidth (void)
 Determines the number of columns in the terminal. More...
 
int er_strutils_termheight (void)
 Determines the number of rows in the terminal. More...
 
const char * er_strutils_dblstr (double value)
 Fills a string with a double precision value. More...
 

Detailed Description

Utility functions for handling strings.

Function Documentation

const char* er_strutils_dblstr ( double  value)

Fills a string with a double precision value.

Parameters
valueA double precision number that is to be converted into a string.
Returns
A pointer to a static buffer, containing the string representation of the given double.
Warning
This function uses a static buffer, and so should only be called once per operational element.

This function is used to generate a string-representation of a supplied double precision number, with the minimum amount of precision in order to be able to accurately reconstruct the original number. The string is stored locally as a static variable, and a pointer to it is returned. Thus, the function must not be called multiple times in a single operational element.

int er_strutils_termheight ( void  )

Determines the number of rows in the terminal.

Returns
The number of rows in the terminal, or 24 if this cannot be determined.

This function determines the number of rows that are present in the terminal window at the time that it is called. If it is not possible to determine this, then a deafult of 24 lines is assumed.

int er_strutils_termwidth ( void  )

Determines the number of columns in the terminal.

Returns
The number of columns in the terminal, or 80 if this cannot be determined.

This function determines the number of columns that are present in the terminal window at the time that it is called. If it is not possible to determine this, then a deafult of 80 characters is assumed.