strict_strtol(9)

strict_strtol9

Convert a string to a long strictly

Usage

int strict_strtol(const char * cp, unsigned int base, long * res);

Arguments

cp

The string to be converted

base

The number base to use

res

The converted result value

Overview

strict_strtol is similiar to strict_strtoul, but it allows the first character of a string is '-'.

It returns 0 if conversion is successful and *res is set to the converted value, otherwise it returns -EINVAL and *res is set to 0.

Releases

2 releases since Debian 5.0 (Lenny); the text changed 1 time.

  1. 5.0
  2. 6.0

From linux-manual-2.6.32 2.6.32-48squeeze6 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.