Number to Decimal String

Converts a numeric value to a string that shows the number's decimal format.

1378

Inputs/Outputs

datatype_icon

number

A number to be converted into a string.

This input can also be any data type that contains only numbers, such as an array of numbers or a cluster of numbers.

datatype_icon

width

A number specifying how many characters to use to express number as a string.

If width is less than the number of characters required, this node uses exactly as many characters as needed. If width is greater than the number of characters required, this node adds a space on the left side of the output string for each additional character.

Default value: No value — Exactly as many characters as are needed to represent the number, with no extra padding.

datatype_icon

decimal integer string

The decimal string that represents number.

Examples

The following table shows how the values of number and width affect decimal integer string. In this table, the underline character ( _ ) represents spaces in decimal integer string.
number width decimal integer string Comments
4.6 2 _5 Floating-point and fixed-point numbers are rounded to integers.
3.0 4 _ _ _3 If width is larger than necessary, spaces are added on the left.
-311 3 -311 If width is smaller than necessary, decimal integer string is as large as necessary.