Logo

Programming-Idioms

History of Idiom 22 > diff from v99 to v100

Edit summary for version 100 by OC:
[Obj-C] Added note on the import

Version 99

2020-10-10, 18:46:57

Version 100

2020-10-10, 19:12:49

Idiom #22 Convert string to integer

Extract integer value i from its string representation s (in radix 10)

Idiom #22 Convert string to integer

Extract integer value i from its string representation s (in radix 10)

Variables
i,s
Variables
i,s
Extra Keywords
int base conversion
Extra Keywords
int base conversion
Imports
Imports
@import Foundation;
Code
int i=s.intValue
Code
int i=s.intValue
Comments bubble
As in most other idioms, the standard Foundation library, used with practically all the ObjC-based environments, is used