string(fromValue:unit:)
Returns a properly formatted energy string for the given value and unit.
Declaration
func string(fromValue value: Double, unit: EnergyFormatter.Unit) -> StringParameters
- value:
The energy value in the given unit.
- unit:
The unit used in the resulting energy string.
Return Value
A localized string that combines the provided value and unit.