string(from:)
Formats the value of the given measurement using the receiver’s countStyle.
Declaration
func string(from measurement: Measurement<UnitInformationStorage>) -> StringDiscussion
Converts the measurement to the units allowed by the receiver’s allowedUnits before formatting; depending on the value of the measurement, this may result in a string which implies an approximate value (e.g. if the measurement is too large to represent in allowedUnits, like 1e20 YB expressed in NSByteCountFormatterUseBytes).
Throws an exception if the given measurement’s unit does not belong to the NSUnitInformationStorage dimension.