Contents

string(fromKilograms:)

Returns a mass string for the provided value.

Declaration

func string(fromKilograms numberInKilograms: Double) -> String

Parameters

  • numberInKilograms:

    The mass’s value in kilograms.

Return Value

A string that combines a value and a unit string appropriate for the formatter’s locale.

Discussion

This method converts the provided mass in kilograms into units appropriate for the formatter’s locale.

See Also

Formatting Mass Strings