This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| functions:atoi [2017/04/17 11:58] – korshun | functions:atoi [2017/04/17 12:33] (current) – korshun | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| ===== Description ===== | ===== Description ===== | ||
| - | Returns s parsed as a decimal | + | Returns s parsed as a decimal |
| - | If s is too big or too small to fit into int, returns [[INT_MAX]] with the sign of the input. | + | If s is too big or too small to fit into int, returns [[constants:INT_MAX]] with the sign of the input. |
| + | |||
| + | Supports signs and [[:Number prefixes]]. | ||
| + | |||
| + | <note tip>To parse fixed-point numbers, use [[atof]].</ | ||
| + | |||
| + | <note tip>For more flexibility in parsing and error handling, use [[ParseInt]].</ | ||
| + | |||
| + | ===== Examples ===== | ||
| + | < | ||
| + | atoi(" | ||
| + | atoi(" | ||
| + | atoi(" | ||
| + | atoi(" | ||
| + | atoi(" | ||
| + | atoi(" | ||
| + | atoi(" | ||
| + | </ | ||
| - | Supports [[:Number prefixes]]. | ||