can anybody say me the conversion for NSString to NSDecimalNumber
unsigned long long order;
if (i==1) {
order = [feeArray objectAtIndex:0];
}
if (i==2) {
order = [amountArray objectAtIndex:0];
}
thanks in advance
You can use NSDecimalNumber
's decimalNumberWithString
initializer to convert from a string
Try this:
NSString *order = @"";
if (i==1) {
order = [feeArray objectAtIndex:0];
}
if (i==2) {
order = [amountArray objectAtIndex:0];
}
NSDecimalNumber *decimal = [NSDecimalNumber decimalNumberWithString:order];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With