string(for:)
Formats obj as a byte count (if obj is an NSNumber) or specific byte measurement (if obj is an NSMeasurement) using the receiver’s settings.
Declaration
func string(for obj: Any?) -> String?Discussion
Returns nil if obj is not of the correct class (NSNumber or NSMeasurement). Throws an exception if obj is an NSMeasurement whose unit does not belong to the NSUnitInformationStorage dimension.