Conversion for NSString to NSDecimalNumber in Objective-C

ios, nsdecimalnumber, nsstring, objective-c

Solution

You can use `NSDecimalNumber`'s `decimalNumberWithString` initializer to convert from a string

Problem

What is the conversion for NSString to NSDecimalNumber? ``` unsigned long long order; if (i==1) { order = [feeArray objectAtIndex:0]; } if (i==2) { order = [amountArray objectAtIndex:0]; } ```

Original source