Contents

string(fromJoules:)

Returns an energy string for the provided value.

Declaration

func string(fromJoules numberInJoules: Double) -> String

Parameters

  • 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.

See Also

Formatting Energy Strings