number_with_units#

TwinBuilderComponents.number_with_units(value, units=None)#

Convert a number to a string with units. If value is a string, it’s returned as is.

Parameters:
valuefloat, int, str

Input number or string.

unitsoptional

Units for formatting. The default is None, which uses "meter".

Returns:
str

String concatenating the value and unit.