atoi(3) - wariua/manpages-ko GitHub Wiki
atoi, atol, atoll - λ¬Έμμ΄μ μ μλ‘ λ³ννκΈ°
#include <stdlib.h>
int atoi(const char *nptr);
long atol(const char *nptr);
long long atoll(const char *nptr);glibc κΈ°λ₯ νμΈ λ§€ν¬λ‘ μ건 (feature_test_macros(7) μ°Έκ³ ):
-
atoll(): -
_ISOC99_SOURCE
|| /* glibc λ²μ <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
atoi() ν¨μλ nptrμ΄ κ°λ¦¬ν€λ λ¬Έμμ΄μ μ²μ λΆλΆμ intλ‘ λ³ννλ€. λ€μκ³Ό λμμ΄ κ°λ, atoi()μμλ μ€λ₯λ₯Ό κ°μ§νμ§ μλλ€.
strtol(nptr, NULL, 10);atol()κ³Ό atoll() ν¨μλ atoi()μ λμΌνκ² λμνλ λ¬Έμμ΄μ μ²μ λΆλΆμ λ°ν νμ
μΈ longμ΄λ long longμΌλ‘ λ³ννλ€.
λ³νν κ°.
μ΄ μ μμ μ¬μ©νλ μ©μ΄λ€μ λν μ€λͺ μ attributes(7)λ₯Ό 보λΌ.
| μΈν°νμ΄μ€ | μμ± | κ° |
|---|---|---|
atoi(), atol(), atoll()
|
μ€λ λ μμ μ± | MT-Safe locale |
POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD. C89μ POSIX.1-1996μλ ν¨μ atoi()μ atol()λ§ μλ€.
리λ
μ€ libcμμ atoll()μ ꡬμ μ΄λ¦μΈ atoq()λ₯Ό μ 곡νλ€. glibcμμλ atoq()λ₯Ό μ 곡νμ§ μλλ€.
atof(3), strtod(3), strtol(3), strtoul(3)
2016-03-15