xref: /titanic_44/usr/src/lib/libast/common/man/strton.3 (revision 49b225e1cfa7bbf7738d4df0a03f18e3283426eb)
.fp 5 CW .. .nr ;G \\n(.f .Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" \\*(;G .. .aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" .. .aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" .. .aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" ..

0

..

..

STRTON 3
NAME
strton - convert string to long integer
SYNOPSIS
.L "long strton(char* s, char** e)"
DESCRIPTION
strton converts the nul-terminated string s to a long integer. If e not 0 then *e is set to point to the first unrecognized character in s . Leading spaces in s are ignored.

A number is composed of sign-base-number-suffix . All but number are optional. sign may be \+ or -. base may be:

0x for hexadecimal;

0 for octal, or

nn # for base 2 \(le nn \(le 36.

For bases greater than 10 the additional digits are take from the set [a-zA-Z] . The suffix multiplies the converted number and may be:

b block (512)

g giga (1024 * 1024 * 1024)

k kilo (1024)

m mega (1024 * 1024)

"SEE ALSO"
atoi(3), scanf(3), strtod(3)