Next Previous Up Top Contents Index

2.6 The COMMON-EXTENSIONS module

string-to-integer

Function

Summary

Returns the integer represented by its string argument, or by a substring of that argument, in a number base between 2 and 36.

Signature

string-to-integer string #key base start end default => integer next-key 

Arguments

string
An instance of <byte-string>.

base
An instance of <integer>. Default value: 10.

start
An instance of <integer>. Default value: 0.

end
An instance of <integer>. Default value: sizeof(string).

default
An instance of <integer>. Default value: $unsupplied.

Values

integer
An instance of <integer>.

next-key
An instance of <integer>.

Library

common-extensions

Module

common-extensions

Description

Returns the integer represented by the characters of string in the number base base, where base is between 2 and 36. You can constrain the search to a substring of string by giving values for start and end.

This function returns the next key beyond the last character it examines.

If there is no integer contained in the specified region of the string, this function returns default, if specified. If you do not give a value for default, this function signals an error.

This function is similar to C's strtod function.


Common Dylan and Functional Extensions - 31 Mar 00

Next Previous Up Top Contents Index