string(fromJoules:)
Returns an energy string for the provided value.
Declaration
func string(fromJoules numberInJoules: Double) -> StringParameters
- numberInJoules:
The energy value in joules.
Return Value
A string that combines a value and a unit string appropriate for the formatter’s locale.
Discussion
This method converts the provided value in joules into units appropriate to the formatter’s locale.