exa.core.util.formatting.format_unit_string

exa.core.util.formatting.format_unit_string#

format_unit_string(unit_prefix, unit, enclosure='(')#

Return an unit string based on the enclosure sign.

Parameters:
  • unit_prefix (str) – The unit prefix

  • unit (str) – The unit

  • enclosure (str) – Sign for the enclosure. Can be “(”, “[” or “{”. Defaults to “(“.

Returns:

Formatted unit string

Return type:

str