This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
functions:atoi [2017/03/21 15:59] – korshun | functions:atoi [2017/04/17 15:06] – korshun | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Description ===== | ===== Description ===== | ||
- | Returns s converted | + | Returns s parsed as a decimal integer. If s cannot be parsed as an integer, returns 0. |
+ | |||
+ | If s is too big or too small to fit into int, returns | ||
+ | |||
+ | Supports [[:Number prefixes]]. | ||
+ | |||
+ | ===== Examples ===== | ||
+ | < | ||
+ | atoi(" | ||
+ | atoi("0") -> 0 | ||
+ | atoi(" | ||
+ | atoi(" | ||
+ | atoi(" | ||
+ | atoi(" | ||
+ | atoi(" | ||
+ | </ | ||
- | See [[:Number parsing]] for features and examples. |