Skip to main content

Name

ec_atoi — Converts an ASCII string to a signed integer

Synopsis

#include "util.h"

| int **ec_atoi** ( | var, |   | |   | value); |   |

const char * <var class="pdparam">var</var>; int * <var class="pdparam">value</var>;

Description

Converts an ASCII string to a signed integer.

Parameters

var

The string to convert to a signed int. This function assumes the string is an ASCII version of a hexadecimal, octal, or decimal representation of an integer.

value

The address of a signed int. The converted value is stored in *value.

Return Values

This function returns 1 on success, and 0 on failure.

Threading

It is legal to call this function in any thread.

See Also

Was this page helpful?