Fractional Part of NSDecimalNumber
问题 I'm using NSDecimalNumber to store a value for currency. I'm trying to write a method called "cents" which returns the decimal portion of the number as an NSString with a leading 0 if the number is < 10. So basically NSDecimalNumber *n = [[NSDecimalNumber alloc] initWithString:@"1234.55"]; NSString *s = [object cents:n]; And I'm trying to craft a method that will return 01, 02, etc...up to 99 as a string. I can't seem to figure out how to return the mantissa as a string in this format. I feel